---
title: "http_url | Speedscale Docs"
description: "Extract the HTTP URL from an RRPair request with the http_url function, and learn how to handle path segments effectively in Speedscale."
canonical: "https://docs.speedscale.com/guides/transformation/extractors/http_url/"
---

[Documentation index](https://docs.speedscale.com/guides/llms.txt) | [Markdown](https://docs.speedscale.com/guides/transformation/extractors/http_url/index.md) | [Canonical page](https://docs.speedscale.com/guides/transformation/extractors/http_url/)

# http\_url

<a id="purpose"></a>

### Purpose

**http\_url** extracts the HTTP URL from the request portion of the RRPair. If an index is specified then the path will be split into an array and the zero-indexed path segment will be returned. If no index is specified than then entire path is returned.

note

When setting the URL the value should be URL encoded just as it appears in the URL bar of your browser.

<a id="usage"></a>

### Usage

```json
"type": "http_url"
"config": {
    "index": "<number>"
}
```

*   **index** - the index of the path segment

caution

If your URL starts with a `/` then that counts as the first segment. Start from index 1 if you see this.

<a id="example"></a>

### Example

```json
"type": "http_url"
```
