# Request

{% hint style="info" %}
Enables mocking, testing, and replaying
{% endhint %}

## Fields

<details>

<summary>Hostname</summary>

Name of the host where the request was received at

</details>

<details>

<summary>Port</summary>

Port where the request received at

</details>

<details>

<summary>Path</summary>

Request path e.g. /users/1

</details>

<details>

<summary>Latency</summary>

Response latency in milliseconds

</details>

<details>

<summary>Status</summary>

Response status code

</details>

## Components

<details>

<summary>Headers</summary>

List of **name** and **value** pairs respectively representing the header name and header value

</details>

<details>

<summary>Query Params</summary>

List of **name** and **value** pairs respectively representing the query param name and query param value

</details>

<details>

<summary>Body</summary>

Data of blob format representing the request body

</details>

<details>

<summary>Response</summary>

Represents a HTTP response. See details [here](https://docs.stoobly.com/core-concepts/mock-api/requests/response)

</details>

<details>

<summary>Response Headers</summary>

List of **name** and **value** pairs respectively representing the response header name and response header value

</details>

## Request Key

Every request will have a unique identifier for your Stoobly context. This can be retrieved from the UI or the CLI.

### From the UI

Navigate to the requests page then click on a request. This will open the request details page from the right side. At the top there will be a **Key** field which is the request Key.

<figure><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-12616ef7a9aa20e47d3e3ce04087cf475011ba62%2FScreenshot%202023-05-03%20141009%20-%20request%20key.png?alt=media" alt=""><figcaption><p>Request Key in the details page</p></figcaption></figure>

### From the CLI

Run the following command to view some requests:

```
$ stoobly-agent request list

method    host                path     port  body_text_hash    query_params_hash      body_params_hash  committed_at  latency  query  status    is_deleted    http_version  key
GET       localhost           /users   8081                    cddd9a61a91320bb71702                                      287            200             0             1.1  eyJwIjogMCwgImkiOiA0MjR9
```

Here in our example we have a single request. The request key can be found in the `key` column. In the example above, it is`eyJwIjogMCwgImkiOiA0MjR9`.
