Skip to content

Commit

Permalink
docs: fix OnBeforeRequst doc application order (#701)
Browse files Browse the repository at this point in the history
The documentation about the order of middleware application
for OnBeforeRequet was different from the implementation. Fixed this by
changing the documentation.

Fixes #686.
  • Loading branch information
leejuyuu committed Sep 23, 2023
1 parent 9ef9b6f commit 7c1134f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Expand Up @@ -455,9 +455,9 @@ func (c *Client) NewRequest() *Request {
return c.R()
}

// OnBeforeRequest method appends request middleware into the before request chain.
// Its gets applied after default Resty request middlewares and before request
// been sent from Resty to host server.
// OnBeforeRequest method appends a request middleware into the before request chain.
// The user defined middlewares get applied before the default Resty request middlewares.
// After all middlewares have been applied, the request is sent from Resty to the host server.
//
// client.OnBeforeRequest(func(c *resty.Client, r *resty.Request) error {
// // Now you have access to Client and Request instance
Expand Down

0 comments on commit 7c1134f

Please sign in to comment.