.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "NE_GET_STATUS" 3 "20 January 2006" "neon 0.25.5" "neon API reference"
.SH NAME
ne_get_status \- retrieve HTTP response status for request
.SH "SYNOPSIS"
.ad l
.hy 0

#include <ne_request\&.h>
.sp
.HP 33
const\ ne_status\ *\fBne_get_status\fR\ (const\ ne_request\ *\fIrequest\fR);
.ad
.hy

.SH "DESCRIPTION"

.PP
The \fBne_get_status\fR 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 \fIsuccessfully\fR dispatched (the return value of \fBne_request_dispatch\fR or \fBne_begin_request\fR was zero)\&. The object remains valid until the associated request object is destroyed\&.

.SH "SEE ALSO"

.PP
\fBne_status\fR(3), \fBne_request_create\fR(3)

.SH "EXAMPLE"

.PP
Display the response status code of applying the HEAD method to some resource\&.

.nf
ne_request *req = ne_request_create(sess, "HEAD", "/foo/bar");
if (ne_request_dispatch(req))
   /* handle errors\&.\&.\&. */
else
   printf("Response status code was %d\\n", ne_get_status(req)\->code);
ne_request_destroy(req);
.fi

.SH AUTHOR
Joe Orton <neon@webdav\&.org>.
