Sphyrnidae Common Library  2.0.1
Shared Utilities/Library
Sphyrnidae.Common.Extensions.HttpRequestExtensions Class Reference

Extension methods for HttpRequest More...

Static Public Member Functions

static string GetHeader (this HttpRequest request, string name)
 Obtains an item from the HTTP header More...
 
static Task< string > GetBodyAsync (this HttpRequest request)
 Retrieves the body of a request as a string More...
 

Detailed Description

Extension methods for HttpRequest

Member Function Documentation

◆ GetBodyAsync()

static Task<string> Sphyrnidae.Common.Extensions.HttpRequestExtensions.GetBodyAsync ( this HttpRequest  request)
static

Retrieves the body of a request as a string

Parameters
requestThe current http request
Returns
The full body of the request

◆ GetHeader()

static string Sphyrnidae.Common.Extensions.HttpRequestExtensions.GetHeader ( this HttpRequest  request,
string  name 
)
static

Obtains an item from the HTTP header

Parameters
requestThe current http request
nameThe name of the HTTP header to retrieve
Returns
The value of the HTTP header

The documentation for this class was generated from the following file: