The underlying curl library measures how long different components of the request take to complete. This function retrieves that information.
resp_timing(resp)A httr2 response object, created by req_perform().
Named numeric vector of timing information.
The names of the elements in this vector correspond to the names used
in libcurl's curl_easy_getinfo() API.
The most useful component is likely "total" (corresponding to
CURLINFO_TOTAL_TIME), the overall time in seconds to complete the
request including any redirects followed.
req <- request(example_url())
resp <- req_perform(req)
resp_timing(resp)
#> redirect namelookup connect pretransfer starttransfer
#> 0.000000 0.000134 0.000244 0.000271 0.005517
#> total
#> 0.005765