---
title: "get( url, [params] ) | Grafana k6 documentation"
description: "Issue an HTTP GET request."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# get( url, \[params] )

Make a GET request.

Expand table

| Parameter         | Type                                                                     | Description                                                                                               |
|-------------------|--------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| url               | string / [HTTP URL](/docs/k6/latest/javascript-api/k6-http/url/#returns) | Request URL (e.g. `http://example.com`).                                                                  |
| params (optional) | object                                                                   | [Params](/docs/k6/latest/javascript-api/k6-http/params/) object containing additional request parameters. |

### Returns

Expand table

| Type                                                         | Description           |
|--------------------------------------------------------------|-----------------------|
| [Response](/docs/k6/latest/javascript-api/k6-http/response/) | HTTP Response object. |

### Example fetching a URL

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
import http from 'k6/http';

export default function () {
  const res = http.get('https://test.k6.io');
  console.log(JSON.stringify(res.headers));
}
```
