CURLINFO_REDIRECT_TIME_T(3)
π CURLINFO_REDIRECT_TIME_T(3) β Library Functions Manual β¨
okay so bestie, this page is literally about CURLINFO_REDIRECT_TIME_T(3), and it's giving "how long did all the redirecting take?" energy. no cap, it's a curl thing. π¦
πΈ NAME πΈ
CURLINFO_REDIRECT_TIME_T β time for all redirection steps π
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_TIME_T,
curl_off_t *timep);
π DESCRIPTION π
okay so you pass a pointer to a curl_off_t, and it receives the total time, in microseconds, that it took for all redirection steps β including name lookup, connect, pretransfer, and transfer β before the final transaction was started. like, all of it. β±οΈ
CURLINFO_REDIRECT_TIME_T(3) holds the complete execution time for multiple redirections. multiple!! she's tracking the whole redirect saga, not just one hop. π
also, pls go see the TIMES overview in the curl_easy_getinfo(3) man page. iykyk π₯
π PROTOCOLS π
This functionality affects http only. that's the whole vibe check: http, bestie. π«Ά
π EXAMPLE π
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_off_t redirect;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
result = curl_easy_perform(curl);
if(CURLE_OK == result) {
result = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME_T, &redirect);
if(CURLE_OK == result) {
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", redirect / 1000000,
(long)(redirect % 1000000));
}
}
/* always cleanup */
curl_easy_cleanup(curl);
}
}
π AVAILABILITY π
Added in curl 7.61.0. she's not new new, but she's here. β¨
π RETURN VALUE π
curl_easy_getinfo(3) returns a CURLcode indicating success or error. π«
CURLE_OK (0) means everything was OK; non-zero means an error occurred, see libcurl-errors(3). no cap, check the error code. π¨
π¦ SEE ALSO π¦
CURLINFO_REDIRECT_COUNT(3)CURLINFO_REDIRECT_TIME(3)CURLINFO_REDIRECT_URL(3)curl_easy_getinfo(3)curl_easy_setopt(3)
that's the whole page, bestie π β brought to you by libcurl, dated 2026-10-12, and it's the CURLINFO_REDIRECT_TIME_T(3) manual page. slay. π
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms