HttpRequestMessageExtensions.SetNetworkCredentials Method

Namespace:  Microsoft.VisualStudio.Services.Common
Assembly:  Microsoft.VisualStudio.Services.Common (in Microsoft.VisualStudio.Services.Common.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub SetNetworkCredentials ( _
    message As HttpRequestMessage, _
    credentials As ICredentials _
)
public static void SetNetworkCredentials(
    this HttpRequestMessage message,
    ICredentials credentials
)
[ExtensionAttribute]
public:
static void SetNetworkCredentials(
    HttpRequestMessage^ message, 
    ICredentials^ credentials
)
static member SetNetworkCredentials : 
        message:HttpRequestMessage * 
        credentials:ICredentials -> unit
public static function SetNetworkCredentials(
    message : HttpRequestMessage, 
    credentials : ICredentials
)

Parameters

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpRequestMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

HttpRequestMessageExtensions Class

Microsoft.VisualStudio.Services.Common Namespace