Class HttpClientBase
Base class for Http clients.
Inheritance
Assembly: Lucene.Net.Replicator.dll
Syntax
public abstract class HttpClientBase : IDisposable
Remarks
@lucene.experimental
Constructors
Name | Description |
---|---|
HttpClientBase(String, HttpClient) | Creates a new HttpClientBase with the given |
HttpClientBase(String, HttpMessageHandler) | Creates a new HttpClientBase with the given |
HttpClientBase(String, Int32, String, HttpMessageHandler) | Creates a new HttpClientBase with the given host, port and path. |
Fields
Name | Description |
---|---|
DEFAULT_CONNECTION_TIMEOUT | Default connection timeout for this client, in milliseconds. ConnectionTimeout |
Properties
Name | Description |
---|---|
ConnectionTimeout | Gets or Sets the connection timeout for this client, in milliseconds. This setting
is used to modify |
IsDisposed | Returns |
Url | The URL to execute requests against. |
Methods
Name | Description |
---|---|
Dispose() | Disposes this HttpClientBase.
This disposes the underlying |
Dispose(Boolean) | Disposes this HttpClientBase. When called with , this disposes the underlying |
DoAction<T>(HttpResponseMessage, Func<T>) | Calls the overload DoAction<T>(HttpResponseMessage, Boolean, Func<T>) passing |
DoAction<T>(HttpResponseMessage, Boolean, Func<T>) | Do a specific action and validate after the action that the status is still OK,
and if not, attempt to extract the actual server side exception. Optionally
release the response at exit, depending on |
EnsureOpen() | Throws |
ExecuteGet(String, String[]) | Internal: Execute a request and return its result.
The |
ExecutePost(String, Object, String[]) | Internal: Execute a request and return its result.
The |
ResponseInputStream(HttpResponseMessage) | Internal utility: input stream of the provided response. |
ResponseInputStream(HttpResponseMessage, Boolean) | Internal utility: input stream of the provided response, which optionally consumes the response's resources when the input stream is exhausted. |
ThrowKnownError(HttpResponseMessage) | Throws an exception for any errors. |
VerifyStatus(HttpResponseMessage) | Internal: Verifies the response status and if not successful throws an exception. |