HTTP Fetcher Library Documentation

Return to Main

NAME

http_setReferer - Sets the Referer shown to the server during an HTTP GET request.
 

SYNOPSIS

#include <http_fetcher.h>

int http_setReferer(const char *newReferer);
 

DESCRIPTION

The Referer field of an HTTP request tells the server what URL referred you to the current URL being requested. By default, no Referer is sent.

Calling http_setReferer will cause newReferer to be sent as the Referer for subsequent requests (until the next call to http_setReferer).

If you pass in NULL as an argument, HTTP Fetcher will NOT give the server a Referer.
 

RETURN VALUE

On success, http_setReferer returns 0.

On error, -1 is returned, and the previous value of
Referer is unchanged. http_perror can be used to print an informative error message. http_strerror can be used to get a pointer to the current error description message.
 

SEE ALSO

http_fetch(3), http_setUserAgent(3), http_setTimeout(3), http_setRedirects(3), http_parseFilename(3), http_perror(3), http_strerror(3)


Return to Main