"Fossies" - the Fresh Open Source Software archive

Member "neon-0.29.6/doc/html/refgetst.html" of archive neon-0.29.6.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted source code. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.

Name

ne_get_status — retrieve HTTP response status for request

Synopsis

#include <ne_request.h>
const ne_status *ne_get_status(const ne_request *request);
 

Description

The ne_get_status 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 successfully dispatched (the return value of ne_request_dispatch or ne_begin_request was zero). The object remains valid until the associated request object is destroyed.

See also

ne_status, ne_request_create

Example

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

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);