Fauna .NET Driver 0.1.0-beta
 
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Fauna.Connection Class Reference

An HTTP Client wrapper. More...

Inheritance diagram for Fauna.Connection:
Fauna.IConnection

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.
 

Detailed Description

An HTTP Client wrapper.

Definition at line 9 of file Connection.cs.

Constructor & Destructor Documentation

◆ Connection()

Fauna.Connection.Connection ( Configuration  configuration)

Initializes a new instance of the Connection class.

Parameters
configurationThe client configuration to use.

Definition at line 18 of file Connection.cs.

Member Function Documentation

◆ Dispose()

void Fauna.Connection.Dispose ( )

Disposes the resources used by the Connection class.

Definition at line 85 of file Connection.cs.

◆ DoPostAsync()

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.

Parameters
pathThe path of the resource to send the request to.
bodyThe stream containing the request body.
headersA dictionary of headers to be included in the request.
cancelA cancellation token to use with the request.
Returns
A Task representing the asynchronous operation, which upon completion contains the response from the server as HttpResponseMessage.

Implements Fauna.IConnection.

Definition at line 23 of file Connection.cs.


The documentation for this class was generated from the following file: