Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
caracal-js authored Jul 28, 2021
1 parent 7c65c2f commit a49590f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Much more in depth one is in the [demo folder](demo/).
Middleware are functions that will be executed either before request or after response. These can alter the way a request is made or response is sent.

```javascript
function(ctx) {
function(ctx) {r
ctx.body; // (Request / Response) Body (Will return null if none)
ctx.headers; // (Request / Response) Headers
ctx.url; // WHATWG URL
Expand All @@ -183,3 +183,12 @@ function(ctx) {
ctx.remoteResponse; // Node.js Remote Response (Only available on response)
};
```

### Default middleware

- Request
- requestHeaders

- Response
- decompress
- rewriteBody

0 comments on commit a49590f

Please sign in to comment.