Proxy.Client by Daniel Buckle

<PackageReference Include="Proxy.Client" Version="1.1.6" />

 IProxyClient

public interface IProxyClient : IDisposable
Proxy Client Interface
int ConnectTimeout { get; }

Socket Connect Timeout.

string DestinationHost { get; }

Host name or IP address of the destination server.

int DestinationPort { get; }

Port used to connect to the destination server.

string ProxyHost { get; }

Host name or IP address of the proxy server.

int ProxyPort { get; }

Port used to connect to the proxy server.

The type of proxy.

int ReadTimeout { get; }

Socket Read Timeout.

Proxy Protocol.

string UrlQuery { get; }

URL Query.

int WriteTimeout { get; }

Socket Write Timeout.

ProxyResponse Delete(string url, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int readTimeout = 10000, int writeTimeout = 10000)

Connects to the proxy client, sends the DELETE command to the destination server and returns the response.

Task<ProxyResponse> DeleteAsync(string url, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int totalTimeout = 60000, int connectTimeout = 45000, int readTimeout = 10000, int writeTimeout = 10000)

Asynchronously connects to the proxy client, sends the DELETE command to the destination server and returns the response.

ProxyResponse Get(string url, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int readTimeout = 10000, int writeTimeout = 10000)

Connects to the proxy client, sends the GET command to the destination server and returns the response.

Task<ProxyResponse> GetAsync(string url, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int totalTimeout = 60000, int connectTimeout = 45000, int readTimeout = 10000, int writeTimeout = 10000)

Asynchronously connects to the proxy client, sends the GET command to the destination server and returns the response.

ProxyResponse Post(string url, string body, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int readTimeout = 10000, int writeTimeout = 10000)

Connects to the proxy client, sends the POST command to the destination server and returns the response.

Task<ProxyResponse> PostAsync(string url, string body, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int totalTimeout = 60000, int connectTimeout = 45000, int readTimeout = 10000, int writeTimeout = 10000)

Asynchronously connects to the proxy client, sends the POST command to the destination server and returns the response.

ProxyResponse Put(string url, string body, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int readTimeout = 10000, int writeTimeout = 10000)

Connects to the proxy client, sends the PUT command to the destination server and returns the response.

Task<ProxyResponse> PutAsync(string url, string body, bool isKeepAlive = true, IEnumerable<ProxyHeader> headers = null, IEnumerable<Cookie> cookies = null, int totalTimeout = 60000, int connectTimeout = 45000, int readTimeout = 10000, int writeTimeout = 10000)

Asynchronously connects to the proxy client, sends the PUT command to the destination server and returns the response.