Property PreAuthenticateBehavior
PreAuthenticateBehavior
Gets or sets the behavior for setting the Authorization header.
Declaration
public PreAuthenticateBehavior PreAuthenticateBehavior { get; set; }
Property Value
Type | Description |
---|---|
PreAuthenticateBehavior | The behavior for setting the Authorization header. |
Remarks
By default, .NET will not send credentials via the Authorization header until it receives a 401 WWW-Authenticate Basic response from the server, even if credentials have already been specified. This results in at least two requests being sent for each endpoint. This property allows you to change this behavior for this credential.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.10 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.10 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.10 - 100.12 |
Xamarin.Android | 100.10 - 100.15 |
Xamarin.iOS | 100.10 - 100.15 |
UWP | 100.10 - 100.15 |