An HTTP Client wrapper. More...
Public Member Functions | |
Connection (Configuration configuration) | |
Initializes a new instance of the Connection class. | |
async Task< HttpResponseMessage > | DoPostAsync (string path, Stream body, Dictionary< string, string > headers, CancellationToken cancel=default) |
Asynchronously sends a POST request to the specified path with the provided body and headers. | |
void | Dispose () |
Disposes the resources used by the Connection class. | |
An HTTP Client wrapper.
Definition at line 9 of file Connection.cs.
Fauna.Connection.Connection | ( | Configuration | configuration | ) |
Initializes a new instance of the Connection class.
configuration | The client configuration to use. |
Definition at line 18 of file Connection.cs.
void Fauna.Connection.Dispose | ( | ) |
Disposes the resources used by the Connection class.
Definition at line 85 of file Connection.cs.
async Task< HttpResponseMessage > Fauna.Connection.DoPostAsync | ( | string | path, |
Stream | body, | ||
Dictionary< string, string > | headers, | ||
CancellationToken | cancel = default |
||
) |
Asynchronously sends a POST request to the specified path with the provided body and headers.
path | The path of the resource to send the request to. |
body | The stream containing the request body. |
headers | A dictionary of headers to be included in the request. |
cancel | A cancellation token to use with the request. |
Implements Fauna.IConnection.
Definition at line 23 of file Connection.cs.