---
name: "ne_redirect_register"
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_redirect_register"
---

# ne\_redirect\_register(3)

HTTP request redirect handling

## NAME

ne\_redirect\_register, ne\_redirect\_location - HTTP request redirect handling

## SYNOPSIS

```
#include <ne_redirect.h>
```

**void ne\_redirect\_register(ne\_session \****sess***);**

**const ne\_uri \*ne\_redirect\_location(ne\_session \****sess***);**

## DESCRIPTION

The **ne\_redirect\_register** function registers redirect handling for the session. If a valid redirect (with status code 3xx) response is processed, the request will fail with the NE\_REDIRECT error code. The destination of the redirect can then be retrieved using **ne\_redirect\_location**.

If a redirect was processed, the **ne\_redirect\_location** function returns the destination URI of the redirect.

## RETURN VALUE

**ne\_redirect\_location** returns NULL if no request has yet been processed, if the current request was not a redirect, or if the destination of the redirect could not be parsed or resolved. Otherwise it returns a pointer to an **ne\_uri** object, which remains valid until another request is created for the session.

## SEE ALSO

[**ne\_session\_create**(3)](/ne_session_create/3.md).

## COPYRIGHT

Copyright © 2001-2026 Joe Orton\
