Add Digest authorization
Adds Digest authorization by user and password
- Parameters
- Advanced call ?
Function AddDigestAuthorization(Val User, Val Password) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| User | - | String | ✔ | Users name |
| Password | - | String | ✔ | Password |
Returns
DataProcessorObject.OPI_HTTPClient - This processor object
This method has no additional advanced call parameters.
Caution
NOCLI: this method is not available in CLI version
1C:Enterprise/OneScript code example
URL = "https://bin.openintegrations.dev";
URL = URL + "/digest-auth/auth/user/passwd";
Result = OPI_HTTPRequests.NewRequest()
.Initialize()
.SetURL(URL)
.AddDigestAuthorization("user", "passwd") // <---
.ProcessRequest("GET")
.ReturnResponseAsJSONObject();
Result
{
"authenticated": true,
"user": "user"
}