Proxy.Client by Daniel Buckle

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

 BaseProxyClient

public abstract class BaseProxyClient : IProxyClient, IDisposable
Base proxy client class containing the shared logic to be implemented in all derived proxy clients.
public int ConnectTimeout { get; }

Socket Connect Timeout.

public string DestinationHost { get; }

Host name or IP address of the destination server.

public int DestinationPort { get; }

Port used to connect to the destination server.

public string ProxyHost { get; protected set; }

Host name or IP address of the proxy server.

public int ProxyPort { get; protected set; }

Port used to connect to the proxy server.

public ProxyType ProxyType { get; protected set; }

The type of proxy.

public int ReadTimeout { get; }

Socket Read Timeout.

public ProxyScheme Scheme { get; }

The type of proxy.

public string UrlQuery { get; }

URL Query.

public int WriteTimeout { get; }

Socket Write Timeout.

protected BaseProxyClient()

public abstract 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.

public abstract 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.

public virtual void Dispose()

Disposes the socket dependencies.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.