Method HttpClient():setAuthorization() Foundation
Sets username and password for server authentication.
METHOD :setAuthorization( [<cUsername>, <cPassword>] ) --> self
:setAuthorization() returns the object executing the method.
The method :setAuthorization() specifies the credentials for the user to be authenticated on the server for performing the next request. In order to reset the user credentials, the method :setAuthorization() must be called without parameters. Afterwards, no user will be authenticated for performing the next request.
The credentials specified in the parameters to :setAuthorization() are stored in the "Authorization" header element of the HTTP request object assigned to the :httpRequestmember variable. This HTTP request object is used as the default for requests sent using the methods :send() and :sendAsync().
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.