| 1 |
'\" t |
| 2 |
.\" Title: ne_get_status |
| 3 |
.\" Author: |
| 4 |
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> |
| 5 |
.\" Date: 3 May 2011 |
| 6 |
.\" Manual: neon API reference |
| 7 |
.\" Source: neon 0.29.6 |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "NE_GET_STATUS" "3" "3 May 2011" "neon 0.29.6" "neon API reference" |
| 11 |
.\" ----------------------------------------------------------------- |
| 12 |
.\" * Define some portability stuff |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 |
.\" http://bugs.debian.org/507673 |
| 16 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 |
.ie \n(.g .ds Aq \(aq |
| 19 |
.el .ds Aq ' |
| 20 |
.\" ----------------------------------------------------------------- |
| 21 |
.\" * set default formatting |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" disable hyphenation |
| 24 |
.nh |
| 25 |
.\" disable justification (adjust text to left margin only) |
| 26 |
.ad l |
| 27 |
.\" ----------------------------------------------------------------- |
| 28 |
.\" * MAIN CONTENT STARTS HERE * |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.SH "NAME" |
| 31 |
ne_get_status \- retrieve HTTP response status for request |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.ft B |
| 35 |
.nf |
| 36 |
#include <ne_request\&.h> |
| 37 |
.fi |
| 38 |
.ft |
| 39 |
.HP \w'const\ ne_status\ *ne_get_status('u |
| 40 |
.BI "const ne_status *ne_get_status(const\ ne_request\ *" "request" ");" |
| 41 |
.SH "DESCRIPTION" |
| 42 |
.PP |
| 43 |
The |
| 44 |
\fBne_get_status\fR |
| 45 |
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 |
| 46 |
\fIsuccessfully\fR |
| 47 |
dispatched (the return value of |
| 48 |
\fBne_request_dispatch\fR |
| 49 |
or |
| 50 |
\fBne_begin_request\fR |
| 51 |
was zero)\&. The object remains valid until the associated request object is destroyed\&. |
| 52 |
.SH "SEE ALSO" |
| 53 |
.PP |
| 54 |
ne_status, |
| 55 |
ne_request_create |
| 56 |
.SH "EXAMPLE" |
| 57 |
.PP |
| 58 |
Display the response status code of applying the |
| 59 |
HEAD |
| 60 |
method to some resource\&. |
| 61 |
.sp |
| 62 |
.if n \{\ |
| 63 |
.RS 4 |
| 64 |
.\} |
| 65 |
.nf |
| 66 |
ne_request *req = ne_request_create(sess, "HEAD", "/foo/bar"); |
| 67 |
if (ne_request_dispatch(req)) |
| 68 |
/* handle errors\&.\&.\&. */ |
| 69 |
else |
| 70 |
printf("Response status code was %d\en", ne_get_status(req)\->code); |
| 71 |
ne_request_destroy(req); |
| 72 |
.fi |
| 73 |
.if n \{\ |
| 74 |
.RE |
| 75 |
.\} |
| 76 |
.SH "AUTHOR" |
| 77 |
.PP |
| 78 |
\fBJoe Orton\fR <\&[email protected]\&> |
| 79 |
.RS 4 |
| 80 |
Author. |
| 81 |
.RE |
| 82 |
.SH "COPYRIGHT" |
| 83 |
.br |