Requests

A Request represents a HTTP request

Use Case

  • Enables mocking, testing, and replaying

Fields

Hostname

Name of the host where the request was received at

Port

Port where the request received at

Path

Request path e.g. /users/1

Latency

Response latency in milliseconds

Status

Response status code

Components

Headers

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

Query Params

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

Body

Data of blob format representing the request body

Response

Represents a HTTP response. See details here

How To Create Requests

Method 1: UI

Navigate to the requests page and click on the CREATE button on the top left corner.

Method 2: Recording

Method 3: CLI

With the CLI, run the following command to replay an existing rRequest and save it to a new Request.

$ stoobly-agent request replay --record REQUEST_KEY

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.

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 which iseyJwIjogMCwgImkiOiA0MjR9.

Last updated