Constructor HttpClientBase
HttpClientBase(String, Int32, String, HttpMessageHandler)
Creates a new HttpClientBase with the given host, port and path.
Declaration
protected HttpClientBase(string host, int port, string path, HttpMessageHandler messageHandler = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | host | The host that the client should retrieve data from. |
System.Int32 | port | The port to be used to connect on. |
System.String | path | The path to the replicator on the host. |
HttpMessageHandler | messageHandler | Optional, The HTTP handler stack to use for sending requests, defaults to |
Remarks
The host, port and path parameters are normalized to http://{host}:{port}{path}
,
if path is null
or empty
it defaults to /
.
A null
.
In this case the internal
HttpClientBase(String, HttpMessageHandler)
Creates a new HttpClientBase with the given url
.
Declaration
protected HttpClientBase(string url, HttpMessageHandler messageHandler = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The full url, including with host, port and path. |
HttpMessageHandler | messageHandler | Optional, The HTTP handler stack to use for sending requests. |
Remarks
A null
.
In this case the internal
HttpClientBase(String, HttpClient)
Creates a new HttpClientBase with the given url
and
Declaration
protected HttpClientBase(string url, HttpClient client)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | |
HttpClient | client | The |
Remarks
This allows full controll over how the