The OpenD Programming Language

BasicAuthentication

* Basic authentication. * Adds Authorization: Basic header to request * Example: * --- * import requests; * void main() { * rq = Request(); * rq.authenticator = new BasicAuthentication("user", "passwd"); * rs = rq.get("http://httpbin.org/basic-auth/user/passwd"); * } * ---

Constructors

this
this(string username, string password, string[] domains)

Constructor.

Members

Functions

authHeaders
string[string] authHeaders(string domain)

create Basic Auth header

password
string password()

return user password

userName
string userName()

returns username

Meta