| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- '\" t
- .\" Title: ne_get_status
- .\" Author:
- .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
- .\" Date: 11 September 2022
- .\" Manual: neon API reference
- .\" Source: neon 0.32.4
- .\" Language: English
- .\"
- .TH "NE_GET_STATUS" "3" "11 September 2022" "neon 0.32.4" "neon API reference"
- .\" -----------------------------------------------------------------
- .\" * Define some portability stuff
- .\" -----------------------------------------------------------------
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .\" http://bugs.debian.org/507673
- .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .ie \n(.g .ds Aq \(aq
- .el .ds Aq '
- .\" -----------------------------------------------------------------
- .\" * set default formatting
- .\" -----------------------------------------------------------------
- .\" disable hyphenation
- .nh
- .\" disable justification (adjust text to left margin only)
- .ad l
- .\" -----------------------------------------------------------------
- .\" * MAIN CONTENT STARTS HERE *
- .\" -----------------------------------------------------------------
- .SH "NAME"
- ne_get_status \- retrieve HTTP response status for request
- .SH "SYNOPSIS"
- .sp
- .ft B
- .nf
- #include <ne_request\&.h>
- .fi
- .ft
- .HP \w'const\ ne_status\ *ne_get_status('u
- .BI "const ne_status *ne_get_status(const\ ne_request\ *" "request" ");"
- .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
- ne_status,
- ne_request_create
- .SH "EXAMPLE"
- .PP
- Display the response status code of applying the
- HEAD
- method to some resource\&.
- .sp
- .if n \{\
- .RS 4
- .\}
- .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\en", ne_get_status(req)\->code);
- ne_request_destroy(req);
- .fi
- .if n \{\
- .RE
- .\}
- .SH "AUTHOR"
- .PP
- \fBJoe Orton\fR <\&[email protected]\&>
- .RS 4
- Author.
- .RE
- .SH "COPYRIGHT"
- .br
|