C# Класс org.GraphDefined.Vanaheimr.Hermod.HTTP.HTTPClient

A http client.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Close ( ) : void
CreateRequest ( HTTPMethod HTTPMethod, String URI, Action BuilderAction = null ) : HTTPRequestBuilder

Create a new HTTP request.

Dispose ( ) : void
Execute ( HTTPRequest>.Func HTTPRequestDelegate, ClientRequestLogHandler RequestLogDelegate = null, ClientResponseLogHandler ResponseLogDelegate = null, System.TimeSpan Timeout = null, CancellationToken CancellationToken = null ) : Task

Execute the given HTTP request and return its result.

Execute ( HTTPRequest Request, ClientRequestLogHandler RequestLogDelegate = null, ClientResponseLogHandler ResponseLogDelegate = null, System.TimeSpan Timeout = null, CancellationToken CancellationToken = null ) : Task

Execute the given HTTP request and return its result.

HTTPClient ( IIPAddress RemoteIPAddress, IPPort RemotePort, RemoteCertificateValidationCallback RemoteCertificateValidator = null, X509Certificate ClientCert = null, DNSClient DNSClient = null ) : System

Create a new HTTPClient using the given optional parameters.

HTTPClient ( IPSocket RemoteSocket, RemoteCertificateValidationCallback RemoteCertificateValidator = null, X509Certificate ClientCert = null, DNSClient DNSClient = null ) : System

Create a new HTTPClient using the given optional parameters.

HTTPClient ( String RemoteHost, IPPort RemotePort = null, RemoteCertificateValidationCallback RemoteCertificateValidator = null, X509Certificate ClientCert = null, DNSClient DNSClient = null ) : System

Create a new HTTPClient using the given optional parameters.

ToString ( ) : String

Returns a string representation of this object.

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

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

public Close ( ) : void
Результат void

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

Create a new HTTP request.
public CreateRequest ( HTTPMethod HTTPMethod, String URI, Action BuilderAction = null ) : HTTPRequestBuilder
HTTPMethod HTTPMethod A HTTP method.
URI String An URI.
BuilderAction Action A delegate to configure the new HTTP request builder.
Результат HTTPRequestBuilder

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

public Dispose ( ) : void
Результат void

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

Execute the given HTTP request and return its result.
public Execute ( HTTPRequest>.Func HTTPRequestDelegate, ClientRequestLogHandler RequestLogDelegate = null, ClientResponseLogHandler ResponseLogDelegate = null, System.TimeSpan Timeout = null, CancellationToken CancellationToken = null ) : Task
HTTPRequestDelegate HTTPRequest>.Func A delegate for producing a HTTP request for a given HTTP client.
RequestLogDelegate ClientRequestLogHandler A delegate for logging the HTTP request.
ResponseLogDelegate ClientResponseLogHandler A delegate for logging the HTTP request/response.
Timeout System.TimeSpan An optional timeout.
CancellationToken System.Threading.CancellationToken A cancellation token.
Результат Task

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

Execute the given HTTP request and return its result.
public Execute ( HTTPRequest Request, ClientRequestLogHandler RequestLogDelegate = null, ClientResponseLogHandler ResponseLogDelegate = null, System.TimeSpan Timeout = null, CancellationToken CancellationToken = null ) : Task
Request HTTPRequest A HTTP request.
RequestLogDelegate ClientRequestLogHandler A delegate for logging the HTTP request.
ResponseLogDelegate ClientResponseLogHandler A delegate for logging the HTTP request/response.
Timeout System.TimeSpan An optional timeout.
CancellationToken System.Threading.CancellationToken A cancellation token.
Результат Task

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

Create a new HTTPClient using the given optional parameters.
public HTTPClient ( IIPAddress RemoteIPAddress, IPPort RemotePort, RemoteCertificateValidationCallback RemoteCertificateValidator = null, X509Certificate ClientCert = null, DNSClient DNSClient = null ) : System
RemoteIPAddress IIPAddress The remote IP address to connect to.
RemotePort IPPort The remote IP port to connect to.
RemoteCertificateValidator RemoteCertificateValidationCallback A delegate to verify the remote TLS certificate.
ClientCert System.Security.Cryptography.X509Certificates.X509Certificate The TLS client certificate to use.
DNSClient DNSClient An optional DNS client.
Результат System

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

Create a new HTTPClient using the given optional parameters.
public HTTPClient ( IPSocket RemoteSocket, RemoteCertificateValidationCallback RemoteCertificateValidator = null, X509Certificate ClientCert = null, DNSClient DNSClient = null ) : System
RemoteSocket IPSocket The remote IP socket to connect to.
RemoteCertificateValidator RemoteCertificateValidationCallback A delegate to verify the remote TLS certificate.
ClientCert System.Security.Cryptography.X509Certificates.X509Certificate The TLS client certificate to use.
DNSClient DNSClient An optional DNS client.
Результат System

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

Create a new HTTPClient using the given optional parameters.
public HTTPClient ( String RemoteHost, IPPort RemotePort = null, RemoteCertificateValidationCallback RemoteCertificateValidator = null, X509Certificate ClientCert = null, DNSClient DNSClient = null ) : System
RemoteHost String The remote hostname to connect to.
RemotePort IPPort The remote IP port to connect to.
RemoteCertificateValidator RemoteCertificateValidationCallback A delegate to verify the remote TLS certificate.
ClientCert System.Security.Cryptography.X509Certificates.X509Certificate The TLS client certificate to use.
DNSClient DNSClient An optional DNS client.
Результат System

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

Returns a string representation of this object.
public ToString ( ) : String
Результат String