HttpSettingsExtensions.

UseBasicAuthorization(HttpSettings, string, string) Method

Summary

Adds a "Basic" Authorization Header to the request.
Assembly
Cake.Http.dll
Namespace
Cake.Http
Containing Type
HttpSettingsExtensions

Syntax

public static HttpSettings UseBasicAuthorization(this HttpSettings settings, string userName = "", string password = "")

Parameters

Name Type Description
settings HttpSettings The settings.
userName string The userName used to authorize to the resource.
password string The credentials containing the authentication information of the user agent for

Return Value

Type Description
HttpSettings The same HttpSettings instance so that multiple calls can be chained.