> For the complete documentation index, see [llms.txt](https://tekos.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tekos.gitbook.io/doc/building-apps-1/building-apps/http-and-rest-connections/handle-query-parameters-passed-to-an-http-endpoint.md).

# Handle query parameters passed to an HTTP endpoint

#### Problem <a href="#problem" id="problem"></a>

You want to access the query parameters passed to an HTTP endpoint, such as:

```javascript
http://example.com/hello-query?name=Nick
```

#### Solution <a href="#solution" id="solution"></a>

Use the `msg.req.query` property of the message sent by the `HTTP In` node to access the parameters.

**Example**

![](https://2146957470-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSqSDdProPIpKBElfLq%2F-MRU7GWbbG3cccw3q8zA%2F-MRUhCbe0FypDDF8GXAU%2Fimage.png?alt=media\&token=ec378a69-e204-4c1c-a6e7-4f8c63358896)

```markup
[~]$ curl http://localhost:1880/hello-query?name=Nick
<html>
    <head></head>
    <body>
        <h1>Hello Nick!</h1>
    </body>
</html>
```

#### Discussion <a href="#discussion" id="discussion"></a>

The `msg.req.query` property is an object of key/value pairs for each query parameter.

In the above example, a request to `/hello-query?name=Nick&colour=blue` results in the property containing:

```javascript
{
    "name": "Nick",
    "colour": "blue"
}
```

If there are multiple query parameters with the same name, they will be provided as an array. For example, `/hello-query?colour=blue&colour=red`:

```javascript
{
    "colour": ["blue","red"]
}
```
