Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sakopov committed Aug 23, 2018
1 parent 3ba1d70 commit 8a874ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void ConfigureServices(IServiceCollection services)
}
```

## HTTP Response Formatting
## HTTP Response Status Code

If a request is rate-limited by any of the middleware, the client will receive a response with HTTP status code **429 / Too Many Requests** (unless configured otherwise) and content type matching that of the original request. It's possible to provide a custom status code via `HttpStatusCode` property.

Expand All @@ -155,7 +155,7 @@ public void ConfigureServices(IServiceCollection services)
}
```

## Custom HTTP Response Formatting
## HTTP Response Formatting

If you need to customize the rate limit response, you can do so my implementing `IHttpResponseFormatter`. The example below shows HTTP response formatter which adds `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers to the response.

Expand Down

0 comments on commit 8a874ea

Please sign in to comment.