1NE_GET_STATUS(3) neon API reference NE_GET_STATUS(3)
2
3
4
6 ne_get_status - retrieve HTTP response status for request
7
9 #include <ne_request.h>
10
11
12 const ne_status *ne_get_status (const ne_request *request);
13
14
16 The ne_get_status function returns a pointer to the HTTP status object
17 giving the result of a request. The object returned only becomes valid
18 once the request has been successfully dispatched (the return value of
19 ne_request_dispatch or ne_begin_request was zero). The object remains
20 valid until the associated request object is destroyed.
21
22
24 ne_status(3), ne_request_create(3)
25
26
28 Display the response status code of applying the HEAD method to some
29 resource.
30
31 ne_request *req = ne_request_create(sess, "HEAD", "/foo/bar");
32 if (ne_request_dispatch(req))
33 /* handle errors... */
34 else
35 printf("Response status code was %d\n", ne_get_status(req)->code);
36 ne_request_destroy(req);
37
38
40 Joe Orton <neon@webdav.org>.
41
42
43
44neon 0.25.5 20 January 2006 NE_GET_STATUS(3)