---
name: "TSHttpHdrUrlGet"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSHttpHdrUrlGet"
---

# TSHttpHdrUrlGet(3ts)

TSHttpHdrUrlGet API function

## NAME

TSHttpHdrUrlGet - TSHttpHdrUrlGet API function

## SYNOPSIS

```
#include <ts/ts.h>
```

- ***TSReturnCode* TSHttpHdrUrlGet(*TSMBuffer* bufp, *TSMLoc* offset, *TSMLoc* \*locp)**

  ## DESCRIPTION

Get a URL object from an HTTP header. *bufp* and *offset* must have been retrieved from a header object previously (such as via *TSHttpTxnClientReqGet()*). *locp* is updated on success to refer to the URL object. Note this is a URL *object*, from which URL related information can be extracted.

The value placed in *locp* is stable only for a single callback, as other callbacks can change the URL object itself (see *TSHttpHdrUrlSet()*), not just the data in it. That value is also valid only if this function return **TS\_SUCCESS**.

## SEE ALSO

**[TSAPI(3ts)](/TSAPI/3ts.md)**, **[TSHttpTxnClientReqGet(3ts)](/TSHttpTxnClientReqGet/3ts.md)**, **[TSHttpTxnServerReqGet(3ts)](/TSHttpTxnServerReqGet/3ts.md)**, **[TSHttpTxnServerRespGet(3ts)](/TSHttpTxnServerRespGet/3ts.md)**, **[TSHttpTxnClientRespGet(3ts)](/TSHttpTxnClientRespGet/3ts.md)**

## COPYRIGHT

2026, dev@trafficserver.apache.org
