Table of Contents

Class SpeakeasyHttpClient

Namespace
Styra.Opa.OpenApi.Utils
Assembly
Styra.Opa.dll
public class SpeakeasyHttpClient : ISpeakeasyHttpClient
Inheritance
SpeakeasyHttpClient
Implements
Inherited Members

Constructors

SpeakeasyHttpClient()

public SpeakeasyHttpClient()

Fields

httpClient

protected readonly HttpClient httpClient

Field Value

HttpClient

Methods

CloneAsync(HttpRequestMessage)

Clones an HTTP request asynchronously.

public virtual Task<HttpRequestMessage> CloneAsync(HttpRequestMessage request)

Parameters

request HttpRequestMessage

The HTTP request message to clone.

Returns

Task<HttpRequestMessage>

The value of the TResult parameter contains the cloned HTTP request message.

Remarks

This method is used in the context of Retries. It creates a new HttpRequestMessage instance as a deep copy of the original request, including its method, URI, content, headers and options.

SendAsync(HttpRequestMessage)

Sends an HTTP request asynchronously.

public virtual Task<HttpResponseMessage> SendAsync(HttpRequestMessage request)

Parameters

request HttpRequestMessage

The HTTP request message to send.

Returns

Task<HttpResponseMessage>

The value of the TResult parameter contains the HTTP response message.