• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class HttpRequestMessageExtensions

Extends the HttpRequestMessage collection.

Inheritance
System.Object
HttpRequestMessageExtensions
Namespace: Dnn.PersonaBar.Library
Assembly: Dnn.PersonaBar.Library.dll
Syntax
public static class HttpRequestMessageExtensions : object

Methods

| Improve this Doc View Source

GetCookie(HttpRequestMessage, String)

Retrieves an individual cookie from the cookies collection.

Declaration
public static string GetCookie(this HttpRequestMessage request, string cookieName)
Parameters
Type Name Description
HttpRequestMessage request
System.String cookieName
Returns
Type Description
System.String

The cookie value or null.

| Improve this Doc View Source

GetHeader(HttpRequestMessage, String)

Returns an individual HTTP Header value.

Declaration
public static string GetHeader(this HttpRequestMessage request, string key)
Parameters
Type Name Description
HttpRequestMessage request
System.String key
Returns
Type Description
System.String

The header value or null.

| Improve this Doc View Source

GetQueryString(HttpRequestMessage, String)

Returns an individual querystring value.

Declaration
public static string GetQueryString(this HttpRequestMessage request, string key)
Parameters
Type Name Description
HttpRequestMessage request
System.String key
Returns
Type Description
System.String

The query string value or null.

| Improve this Doc View Source

GetQueryStringAsInteger(HttpRequestMessage, String)

Returns an individual querystring value as integer.

Declaration
public static int GetQueryStringAsInteger(this HttpRequestMessage request, string key)
Parameters
Type Name Description
HttpRequestMessage request
System.String key
Returns
Type Description
System.Int32

The query string value or -1.

| Improve this Doc View Source

GetQueryStrings(HttpRequestMessage)

Returns a dictionary of QueryStrings that's easier to work with than GetQueryNameValuePairs KevValuePairs collection.

If you need to pull a few single values use GetQueryString instead.

Declaration
public static Dictionary<string, string> GetQueryStrings(this HttpRequestMessage request)
Parameters
Type Name Description
HttpRequestMessage request
Returns
Type Description
Dictionary<System.String, System.String>

A of query string keys to values.

  • View Source
Back to top by the community, for the community... #DNNCMS