Skip to content

Commit 5cb008f

Browse files
committed
doc: Document the "stage" API request object field
1 parent 23d7f84 commit 5cb008f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

API.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,24 @@ transaction ID in the `id` field, which should be duplicated in the API response
1010
_This `id` field isn't mentioned in any object documentation - remember to include it in the responses, or else the
1111
addon won't know what to do with them._
1212

13+
Alongside the `id` field, the various flow stage API requests have some common fields. See the
14+
[Flow stages](#flow-stages) section for more information.
15+
1316
# Multiple clients
14-
This addon supports chaining multiple clients. Requests and responses will be sent through each client in the order of connection,
15-
such that the modifications done by one client become the input of the next.
17+
This addon supports chaining multiple clients. Requests and responses will be sent through each client in the order of
18+
connection, such that the modifications done by one client become the input of the next.
1619

1720
# Flow stages
1821

1922
The WebSocket API sends an API request object at four stages in every HTTP flow. At each stage, the client is expected
2023
to send a certain API response object back.
2124

25+
While the type of API request object varies with each stage, they each have the following common fields:
26+
27+
| Key | Type |
28+
|-----------|--------------------------------------------|
29+
| `stage` | The stage of the flow (e.g. `pre-request`) |
30+
2231
Failure to respond to an API request will leave the flow hanging indefinitely.
2332

2433
The following is a brief overview of the interception flow.

0 commit comments

Comments
 (0)