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

# options( url, \[body], \[params] )

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`).                                                                  |
| body (optional)   | string / object / ArrayBuffer                                            | Request body; objects will be `x-www-form-urlencoded`.                                                    |
| params (optional) | object                                                                   | [Params](/docs/k6/latest/javascript-api/k6-http/params/) object containing additional request parameters. |

### Returns

Expand table

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

### Example

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

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

const url = 'https://quickpizza.grafana.com/';

export default function () {
  const params = { headers: { 'X-MyHeader': 'k6test' } };
  const res = http.options(url, null, params);
  console.log(res.headers['Allow']);
}
```
