HTTP Fetcher(3)

NAME

http_setRedirects - Sets the number of HTTP redirects HTTP Fetcher will automatically follow

SYNOPSIS

#include <http_fetcher.h>

void http_setRedirects(int redirects);

DESCRIPTION

When HTTP Fetcher receives a response header with a status code of 3XX, it will automatically follow the associated 'Location:' field, if any. redirects is the maximum number of redirects to follow before returning an error. To disable redirects, pass a 0. The default is to follow 3 redirects. Under this implementation (which is just a stopgap, really) the caller won't be aware of any redirection and will assume the returned document came from the original URL it requested. Future releases (2.x.x) will improve on this poor design.

RETURN VALUE

http_setTimeout returns no value and should always succeed.

SEE ALSO

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