ne_get_status, ne_get_response_location, ne_get_response_retry_after — retrieve HTTP response properties
#include <ne_request.h>
const ne_status *ne_get_status( | const ne_request *request) ; |
ne_uri *ne_get_response_location( | ne_request *request) ; |
time_t ne_get_response_retry_after( | ne_request *request) ; |
The ne_get_status
function returns
a pointer to the HTTP status object giving the result of a request.
The object returned only becomes valid once the request has been
successfully dispatched (the return value of
ne_request_dispatch
or
ne_begin_request
was zero).
If the response includes a Location
header,
the ne_get_response_location
function parses and
resolves the URI-reference relative to the request target. If a
fragment ("#fragment") is applicable to the request target, it can be
passed as an argument to allow appropriate relative resolution.
The ne_get_response_retry_after
function
parses any Retry-After
header included in the
response. If the header value uses a relative time, it is interpreted
relative to the time the function was invoked, rather than the time
the response was received, so the function should be used directly
after dispatching the request.
ne_get_status
returns a pointer to
the HTTP status object giving the result of a request. This
pointer is valid until the associated request object is
destroyed.
ne_get_response_location
returns a
malloc-allocated ne_uri object, or NULL if either the URI in
the Location header could not be parsed or the Location header
was not present.
ne_get_response_retry_after
returns
a time_t value, or zero if either no Retry-After header was
included or the header value could not be parsed.