C# Class Raven.Client.Connection.HttpJsonRequest

A representation of an HTTP json request to the RavenDB server
Exibir arquivo Open project: nhsevidence/ravendb Class Usage Examples

Public Methods

Method Description
AddOperationHeaders ( string>.IDictionary operationsHeaders ) : void

Adds the operation headers.

AddOperationHeaders ( NameValueCollection operationsHeaders ) : void

Adds the operation headers.

BeginWrite ( string dataToWrite, AsyncCallback callback, object state ) : IAsyncResult

Begins the write operation

CalculateDuration ( ) : double
EndWrite ( IAsyncResult result ) : void

Ends the write operation.

HandleUnauthorizedResponse ( HttpWebResponse unauthorizedResponse ) : bool
HandleUnauthorizedResponseAsync ( HttpWebResponse unauthorizedResponse ) : Task
ReadResponseString ( ) : string

Reads the response string.

ReadResponseStringAsync ( ) : Task

Begins the read response string.

Write ( string data ) : void

Writes the specified data.

Private Methods

Method Description
HttpJsonRequest ( string url, string method, RavenJObject metadata, ICredentials credentials, HttpJsonRequestFactory factory, IHoldProfilingInformation owner, DocumentConvention conventions ) : System
InternalReadResponseStringAsync ( int retries ) : Task
ReadStringInternal ( Func getResponse ) : string
RecreateWebRequest ( Action action ) : void
WriteMetadata ( RavenJObject metadata ) : void

Method Details

AddOperationHeaders() public method

Adds the operation headers.
public AddOperationHeaders ( string>.IDictionary operationsHeaders ) : void
operationsHeaders string>.IDictionary The operations headers.
return void

AddOperationHeaders() public method

Adds the operation headers.
public AddOperationHeaders ( NameValueCollection operationsHeaders ) : void
operationsHeaders NameValueCollection The operations headers.
return void

BeginWrite() public method

Begins the write operation
public BeginWrite ( string dataToWrite, AsyncCallback callback, object state ) : IAsyncResult
dataToWrite string The byte array.
callback AsyncCallback The callback.
state object The state.
return IAsyncResult

CalculateDuration() public method

public CalculateDuration ( ) : double
return double

EndWrite() public method

Ends the write operation.
public EndWrite ( IAsyncResult result ) : void
result IAsyncResult The result.
return void

HandleUnauthorizedResponse() public method

public HandleUnauthorizedResponse ( HttpWebResponse unauthorizedResponse ) : bool
unauthorizedResponse System.Net.HttpWebResponse
return bool

HandleUnauthorizedResponseAsync() public method

public HandleUnauthorizedResponseAsync ( HttpWebResponse unauthorizedResponse ) : Task
unauthorizedResponse System.Net.HttpWebResponse
return Task

ReadResponseString() public method

Reads the response string.
public ReadResponseString ( ) : string
return string

ReadResponseStringAsync() public method

Begins the read response string.
public ReadResponseStringAsync ( ) : Task
return Task

Write() public method

Writes the specified data.
public Write ( string data ) : void
data string The data.
return void