> For the complete documentation index, see [llms.txt](https://docs.medable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.medable.com/cortex-api/scripting/modules-1/request-module.md).

# Request Module

\
&#x20;Import

```
import request from 'request';
```

Represents the current HTTP request. The request includes the following properties:

* `_id` (ObjectId) the request identifier
* `body` (Object) the request body
* `client` (Object)
  * `_id` (ObjectId) the app client identifier
  * `key` (String) the app client key used to perform the request
* `headers` (Object) an object keyed by the request headers.
* `host` (String) the hostname
* `params` (Object) the parsed params from an api endpoint. (eg /routes/:foo -> req.params.foo)
* `path` (String) the url path
* `query` (Object) the parse http query portion of the request (eg /foo?bar=baz -> req.query.bar=='baz')
* `url` (String) the original request url

### Methods

[getCookie(cookie)](https://docs.medable.com/reference#section-getcookie-cookie-)\
[getHeader(header)](https://docs.medable.com/reference#section-getheader-header-)

### getCookie(cookie)

Get a cookie value.

**Arguments**

* `cookie` (String) the cookie name.

**Returns**

* `value` (String) the cookie value.

### getHeader(header)

Gets a request header

**Arguments**

* `header` (String) the name of the header.

**Returns**

* `value` (String) the header value.
