C# Class Stumps.ProxyHandler

A class implementing the T:Stumps.Http.IHttpHandler interface that proxies requests to an external host.
Inheritance: IHttpHandler
ファイルを表示 Open project: Cayan-LLC/stumps Class Usage Examples

Public Methods

Method Description
ProcessRequest ( IStumpsHttpContext context ) : Task

Processes an incoming HTTP request.

ProxyHandler ( Uri externalHostUri ) : System

Initializes a new instance of the T:Stumps.ProxyHandler class.

Private Methods

Method Description
BuildRemoteUrlFromContext ( IStumpsHttpContext incommingHttpContext ) : string

Builds the remote URL from context.

ExecuteRemoteWebRequest ( HttpWebRequest remoteWebRequest, HttpWebResponse &remoteWebResponse ) : bool
GetHeaderValue ( string>.Dictionary headers, string headerName, string defaultValue ) : string

Gets the value of a header.

PopulateRemoteBodyFromContext ( IStumpsHttpContext incommingHttpContext, HttpWebRequest remoteWebRequest, HttpWebResponse &remoteWebResponse ) : bool

Populates the remote body from context.

PopulateRemoteHeadersFromContext ( IStumpsHttpContext incommingHttpContext, HttpWebRequest remoteWebRequest ) : void
WriteContextBodyFromRemoteResponse ( IStumpsHttpContext incommingHttpContext, HttpWebResponse remoteWebResponse ) : void

Writes the context body from the remote response.

WriteContextHeadersFromResponse ( IStumpsHttpContext incommingHttpContext, HttpWebResponse remoteWebResponse ) : void

Writes the context headers from the remote response.

Method Details

ProcessRequest() public method

Processes an incoming HTTP request.
is null.
public ProcessRequest ( IStumpsHttpContext context ) : Task
context IStumpsHttpContext The representing both the incoming request and the response.
return Task

ProxyHandler() public method

Initializes a new instance of the T:Stumps.ProxyHandler class.
public ProxyHandler ( Uri externalHostUri ) : System
externalHostUri System.Uri The external host URI.
return System