-
Notifications
You must be signed in to change notification settings - Fork 1
Config Variables
Config variables have the effect of changing global "behavior" and are identified by a leading underscore (_
) for example _url
.
Anything set this way will apply to all requests, unless you over-ride them.
Here are all the available config variables.
| Name | Type | Effect |
| _url
| string | Sets the default "base URL" for all requests |
| _headers
| json | Sets the headers for all requests |
| _cookies
| json | Sets the cookies for all requests "
| _ssl
| boolean / json | Set this to true
if you have to test HTTPS and the server is strict |
| _charset
| string | Set this to (null)
if you want to not append ; charset=UTF-8
to the Content-Type
header |
| _followRedirects
| boolean | Set this to false
to not follow redirects by default |
| _connectTimeout
| number | Increase the connect timeout which defaults to 30000 (30 seconds) |
| _readTimeout
| number | Increase the read timeout which defaults to 30000 (30 seconds) |
| _proxy
| string / json | The URI of the proxy server to use |
For more details, you can also refer to the corresponding configure keys in the Karate engine that is used behind the scenes.
Those that expect a JSON can also be a JS function that returns a JSON, allowing for some very dynamic behavior.