---
name: "ne_get_request_target"
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_request_target"
---

# ne\_get\_request\_target(3)

retrieve request target

## NAME

ne\_get\_request\_target - retrieve request target

## SYNOPSIS

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

**const ne\_uri \*ne\_get\_request\_target(ne\_request \****req***);**

## DESCRIPTION

The **ne\_get\_request\_target** returns the request target URI as a pointer to an ne\_uri object. The "target resource" of a request is defined per **Section 7.1 of RFC 9110**\[1\] and is derived from the parameters used to create the request with [**ne\_request\_create**(3)](/ne_request_create/3.md) and the parameters used to create the session with [**ne\_session\_create**(3)](/ne_session_create/3.md).

## RETURN VALUE

The **ne\_get\_request\_target** function returns a ne\_uri, or NULL if it was not possible to create the target URI. The latter can only occur if the path used to create the request object was not a valid URI path. Note that the *path* field of the returned object can be the empty string if the authority-form of the URI is used.

## HISTORY

**ne\_get\_request\_target** is available in neon 0.34.0 and later.

## SEE ALSO

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

## COPYRIGHT

Copyright © 2001-2026 Joe Orton\

## REFERENCES

- 1\.

  Section 7.1 of RFC 9110

  https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1
