C# Class Microsoft.Protocols.TestTools.StackSdk.CommonStack.HttpClientTransport

HttpClientTransport class provides transport layer support.
Inheritance: IDisposable
Exibir arquivo Open project: Microsoft/WindowsProtocolTestSuites Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Release the managed and unmanaged resources.

HttpClientTransport ( TransferProtocol transfer, string serverAddress, int port, string fileName ) : System

Initializes a new instance of the HttpClientTransport class. Constructor of class HttpClientTransport to generate HTTP or HTTPs URI.

HttpClientTransport ( TransferProtocol transfer, string serverAddress, int port, string fileName, ILogPrinter logger ) : System

Initializes a new instance of the HttpClientTransport class. Constructor of class HttpClientTransport to generate HTTP or HTTPs URI.

HttpClientTransport ( TransferProtocol transfer, string serverAddress, int port, string fileName, string domainName, string userName, string userPassword ) : System

Initializes a new instance of the HttpClientTransport class. Constructor of class HttpClientTransport to generate HTTP or HTTPs URI.

Receive ( byte &payloadData ) : HttpWebResponse

Receive HTTP response from the specified server.

Send ( System.Version httpVersion, string>.Dictionary httpHeader, byte httpBodyData, HttpMethod httpMethod, int timeOut ) : void

Send HTTP request for the full content from the specified server.

Send ( System.Version httpVersion, string>.Dictionary httpHeader, byte httpBodyData, HttpMethod httpMethod, int timeOut, int rangeFrom, int rangeTo ) : void

Send HTTP request for the partial content from the specified server.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Release resources.

Private Methods

Method Description
GetBytes ( byte buffer, int &index, int count ) : byte[]

Get bytes from bytes.

Method Details

Dispose() public method

Release the managed and unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Release resources.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, managed and unmanaged resources are disposed. /// If false, only unmanaged resources can be disposed. ///
return void

HttpClientTransport() public method

Initializes a new instance of the HttpClientTransport class. Constructor of class HttpClientTransport to generate HTTP or HTTPs URI.
public HttpClientTransport ( TransferProtocol transfer, string serverAddress, int port, string fileName ) : System
transfer TransferProtocol Indicates the transfer protocol is HTTP or HTTPs.
serverAddress string The address of HTTP server.
port int The port number of HTTP server.
fileName string The requested file name.
return System

HttpClientTransport() public method

Initializes a new instance of the HttpClientTransport class. Constructor of class HttpClientTransport to generate HTTP or HTTPs URI.
public HttpClientTransport ( TransferProtocol transfer, string serverAddress, int port, string fileName, ILogPrinter logger ) : System
transfer TransferProtocol Indicates the transfer protocol is HTTP or HTTPs.
serverAddress string The address of HTTP server.
port int The port number of HTTP server.
fileName string The requested file name.
logger ILogPrinter An instance of ILogPrinter.
return System

HttpClientTransport() public method

Initializes a new instance of the HttpClientTransport class. Constructor of class HttpClientTransport to generate HTTP or HTTPs URI.
public HttpClientTransport ( TransferProtocol transfer, string serverAddress, int port, string fileName, string domainName, string userName, string userPassword ) : System
transfer TransferProtocol Indicates the transfer protocol is HTTP or HTTPs.
serverAddress string The address of HTTP server.
port int The port number of HTTP server.
fileName string The requested file name.
domainName string The domain name.
userName string The user name.
userPassword string The password.
return System

Receive() public method

Receive HTTP response from the specified server.
public Receive ( byte &payloadData ) : HttpWebResponse
payloadData byte Return the whole HTTP response payload.
return System.Net.HttpWebResponse

Send() public method

Send HTTP request for the full content from the specified server.
public Send ( System.Version httpVersion, string>.Dictionary httpHeader, byte httpBodyData, HttpMethod httpMethod, int timeOut ) : void
httpVersion System.Version The HTTP version.
httpHeader string>.Dictionary The HTTP header.
httpBodyData byte The HTTP body data.
httpMethod HttpMethod The HTTP method.
timeOut int The number of milliseconds to wait before the request times out.
return void

Send() public method

Send HTTP request for the partial content from the specified server.
public Send ( System.Version httpVersion, string>.Dictionary httpHeader, byte httpBodyData, HttpMethod httpMethod, int timeOut, int rangeFrom, int rangeTo ) : void
httpVersion System.Version The HTTP version.
httpHeader string>.Dictionary The HTTP header.
httpBodyData byte The HTTP payload.
httpMethod HttpMethod The HTTP method.
timeOut int The number of milliseconds to wait before the request times out.
rangeFrom int The start position in bytes at which to the requested data.
rangeTo int The end position in bytes at which to the requested data.
return void