Class BasicAuthentication
Basic authentication. Adds Authorization: Basic header to request
Constructors
| Name | Description |
|---|---|
this
|
Constructor. |
Fields
| Name | Type | Description |
|---|---|---|
_domains
|
string[] | |
_password
|
string | |
_username
|
string |
Methods
| Name | Description |
|---|---|
authHeaders
|
create Basic Auth header |
password
|
return user password |
userName
|
returns username |
Example
import requests;
void main() {
rq = Request();
rq .authenticator = new BasicAuthentication("user", "passwd");
rs = rq .get("http://httpbin.org/basic-auth/user/passwd");
}