rest.useAuth
rest.useAuth(name)
Description
Uses the credentials with this name from the credential store for all subsequent requests.
Use this together with rest.rawAuthorizationTokenMode(true) when you need the token to be sent directly in the Authorization header without any prefix. This is useful for APIs that expect a raw token value. Set it to false to restore the default prefixed behavior.
Parameters
| Parameter | Type | Explanation |
|---|---|---|
| name | String | The name of the credentials in the cretential store |
Example
http = option.rest
http.useAuth("1gtw_creds")
http.rawAuthorizationTokenMode(true)