Here's the code I am currently using to make calls to the api, where api
is a string passed into the function. Set up of the httpClient is done beforehand outside of the method.
HttpResponseMessage response = await httpClient.GetAsync(api);
String strResp = await response.Content.ReadAsStringAsync();
httpClient.DefaultRequestHeaders.Accept.Clear();
Is there a way I can track metrics like time to first byte (TTFB) using this code, or will I have to go another route?
Aucun commentaire:
Enregistrer un commentaire