Skip to content

Commit

Permalink
Update options.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 29, 2023
1 parent dec1690 commit 79ede3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/core/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1756,8 +1756,9 @@ export default class Options {
}

/**
Defines if redirect responses should be followed automatically. Defaults to `true`.
This property can also be implemented as a function which gets response object as a single argument and should return true if redirects should continue or false otherwise.
Whether redirect responses should be followed automatically.
Optionally, pass a function to dynamically decide based on the response object.
Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), Got will automatically request the resource pointed to in the location header via `GET`.
This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4). You can optionally turn on this behavior also for other redirect codes - see `methodRewriting`.
Expand Down

0 comments on commit 79ede3d

Please sign in to comment.