true
, false
true
If enabled, follow HTTP 3xx responses as redirects.
1link - request:
2link path: /home
3link method: get
4link additional_options:
5link followRedirect: false
6link response:
7link status_code: 200
true
, false
false
If enabled, follow non-GET HTTP 3xx responses as redirects.
1link - request:
2link path: /home
3link method: get
4link additional_options:
5link followRedirect: true
6link followAllRedirects: true
7link response:
8link status_code: 200
true
, false
false
If enabled, redirect to the original HTTP method.
If disabled (by default), redirects to the original HTTP method.
1link - request:
2link path: /home
3link method: get
4link additional_options:
5link followRedirect: true
6link followOriginalHttpMethod: true
7link response:
8link status_code: 200
utf8
, null
utf8
Encoding to be used on setEncoding of response data.
If null
, the body is returned as a raw Buffer.
If specified, passed as encoding parameter of Buffer.toString()
.
⚠️ Note: if expecting binary data, use
encoding: null
to get the raw Buffer
1link - request:
2link path: /files/some-file.png
3link method: get
4link additional_options:
5link encoding: null
6link response:
7link status_code: 200
true
, false
If enabled, adds an Accept-Encoding
header to request compressed content encodings from the server (if not already present).
Also decodes supported content encodings in the response.
1link - request:
2link path: /home
3link method: get
4link additional_options:
5link gzip: true
6link response:
7link status_code: 200