1NE_GET_STATUS(3)              neon API reference              NE_GET_STATUS(3)
2
3
4

NAME

6       ne_get_status - retrieve HTTP response status for request
7

SYNOPSIS

9       #include <ne_request.h>
10
11       const ne_status *ne_get_status(const ne_request *request);
12

DESCRIPTION

14       The ne_get_status function returns a pointer to the HTTP status object
15       giving the result of a request. The object returned only becomes valid
16       once the request has been successfully dispatched (the return value of
17       ne_request_dispatch or ne_begin_request was zero). The object remains
18       valid until the associated request object is destroyed.
19

SEE ALSO

21       ne_status, ne_request_create
22

EXAMPLE

24       Display the response status code of applying the HEAD method to some
25       resource.
26
27           ne_request *req = ne_request_create(sess, "HEAD", "/foo/bar");
28           if (ne_request_dispatch(req))
29              /* handle errors... */
30           else
31              printf("Response status code was %d\n", ne_get_status(req)->code);
32           ne_request_destroy(req);
33

AUTHOR

35       Joe Orton <neon@lists.manyfish.co.uk>
36           Author.
37
39neon 0.29.3                     11 January 2010               NE_GET_STATUS(3)
Impressum