HttpRequestMessageExtensions.GetUrlHelper Method
Gets a UrlHelper instance for an HTTP request.
Namespace: System.Net.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetUrlHelper ( _
request As HttpRequestMessage _
) As UrlHelper
'Usage
Dim request As HttpRequestMessage
Dim returnValue As UrlHelper
returnValue = request.GetUrlHelper()
public static UrlHelper GetUrlHelper(
this HttpRequestMessage request
)
[ExtensionAttribute]
public:
static UrlHelper^ GetUrlHelper(
HttpRequestMessage^ request
)
static member GetUrlHelper :
request:HttpRequestMessage -> UrlHelper
public static function GetUrlHelper(
request : HttpRequestMessage
) : UrlHelper
Parameters
request
Type: HttpRequestMessageThe HTTP request.
Return Value
Type: System.Web.Http.Routing.UrlHelper
A UrlHelper instance that is initialized for the specified HTTP request.
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 https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).