HttpSettingsExtensions.

UseBearerAuthorization(HttpSettings, string) Method

Summary

Adds a "Bearer" Token Authorization Header to the request. Used when authorization against a resource that uses OAUTH2
Assembly
Cake.Http.dll
Namespace
Cake.Http
Containing Type
HttpSettingsExtensions

Syntax

public static HttpSettings UseBearerAuthorization(this HttpSettings settings, string token = "")

Parameters

Name Type Description
settings HttpSettings The settings.
token string Token to apply to the header

Return Value

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