C# Класс Microsoft.Protocols.TestTools.StackSdk.CommonStack.HttpClientTransport

HttpClientTransport class provides transport layer support.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Release resources.

Приватные методы

Метод Описание
GetBytes ( byte buffer, int &index, int count ) : byte[]

Get bytes from bytes.

Описание методов

Dispose() публичный Метод

Release the managed and unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

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. ///
Результат void

HttpClientTransport() публичный Метод

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.
Результат System

HttpClientTransport() публичный Метод

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.
Результат System

HttpClientTransport() публичный Метод

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.
Результат System

Receive() публичный Метод

Receive HTTP response from the specified server.
public Receive ( byte &payloadData ) : HttpWebResponse
payloadData byte Return the whole HTTP response payload.
Результат System.Net.HttpWebResponse

Send() публичный Метод

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.
Результат void

Send() публичный Метод

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.
Результат void