---
name: "ne_get_status"
section: "3"
platform: "linux"
package: "neon"
version: "0.37.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ne_get_status"
---

# ne\_get\_status(3)

retrieve HTTP response properties

## NAME

ne\_get\_status, ne\_get\_response\_location, ne\_get\_response\_retry\_after - retrieve HTTP response properties

## SYNOPSIS

```
#include <ne_request.h>
```

**const ne\_status \*ne\_get\_status(const ne\_request \****request***);**

**ne\_uri \*ne\_get\_response\_location(ne\_request \****request***);**

**time\_t ne\_get\_response\_retry\_after(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).

If the response includes a Location header, the **ne\_get\_response\_location** function parses and resolves the URI-reference relative to the request target. If a fragment ("#fragment") is applicable to the request target, it can be passed as an argument to allow appropriate relative resolution.

The **ne\_get\_response\_retry\_after** function parses any Retry-After header included in the response. If the header value uses a relative time, it is interpreted relative to the time the function was invoked, rather than the time the response was received, so the function should be used directly after dispatching the request.

## RETURN VALUE

**ne\_get\_status** returns a pointer to the HTTP status object giving the result of a request. This pointer is valid until the associated request object is destroyed.

**ne\_get\_response\_location** returns a malloc-allocated ne\_uri object, or NULL if either the URI in the Location header could not be parsed or the Location header was not present.

**ne\_get\_response\_retry\_after** returns a time\_t value, or zero if either no Retry-After header was included or the header value could not be parsed.

## EXAMPLES

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

## HISTORY

**ne\_get\_response\_location** is available in neon 0.34.0 and later.

## SEE ALSO

[**ne\_status**(3)](/ne_status/3.md), [**ne\_request\_create**(3)](/ne_request_create/3.md)

## COPYRIGHT

Copyright © 2001-2026 Joe Orton\
