Skip to main content

rest.setAuth

rest.setAuth(auth)

Description

Sets authentication of the http request. Expects an authentication as input.

Parameters

ParameterTypeExplanation
authAuthenticationThe authentication object recieved from calling .getAuthentication() on an authentication profile which is returned by api.getAuth(name)(LINK to../../api/getting/getAuth.md)

Example

http = option.rest

auth = api.getAuth("1gtw_creds").getAuthentication()
http.setAuth(auth)