Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
curl_easy_nextheader(3) | libcurl Manual | curl_easy_nextheader(3) |
NAME
curl_easy_nextheader - get the next HTTP headerSYNOPSIS
#include <curl/curl.h>
struct curl_header *curl_easy_nextheader(CURL *easy,
unsigned int origin,
int request,
struct curl_header *prev);
DESCRIPTION
This function lets an application iterate over all previously received HTTP headers.EXAMPLE
struct curl_header *prev = NULL;
struct curl_header *h;
/* extract the normal headers from the first request */
while((h = curl_easy_nextheader(easy, CURLH_HEADER, 0, prev))) {
print "%s: %s\n", h->name, h->value);
prev = h;
}
/* extract the normal headers + 1xx + trailers from the last request */
unsigned int origin = CURLH_HEADER| CURLH_1XX | CURLH_TRAILER;
while((h = curl_easy_nextheader(easy, origin, -1, prev))) {
print "%s: %s\n", h->name, h->value);
prev = h;
}
AVAILABILITY
Added in 7.83.0. Officially supported since 7.84.0.RETURN VALUE
This function returns the next header, or NULL when there are no more (matching) headers or an error occurred.SEE ALSO
curl_easy_header(3), curl_easy_perform(3)May 17, 2022 | libcurl 7.84.0 |