LuciadCPillar C# 2023.1.04
Luciad.Net.Http.HttpClient Class Reference

An HTTP Client, implementation of the luciad::IHttpClient interface. More...

Inheritance diagram for Luciad.Net.Http.HttpClient:
Luciad.Net.Http.IHttpClient

Classes

class  Builder
 Builder for the luciad::HttpClient class. More...
 

Public Member Functions

void ClearHttpRequestOptions ()
 
void Dispose ()
 
Luciad.Net.Http.HttpResponse Send (Luciad.Net.Http.HttpRequest request)
 
Luciad.Net.Http.HttpResponse Send (Luciad.Net.Http.HttpRequest request, Luciad.Concurrent.CancellationToken token)
 Returns the HTTP response for the given HTTP request. More...
 
Luciad.Net.Http.HttpResponse Send (Luciad.Net.Http.HttpRequest request, Luciad.Concurrent.CancellationToken token)
 Returns the HTTP response for the given HTTP request. More...
 

Static Public Member Functions

static Luciad.Net.Http.HttpClient.Builder NewBuilder ()
 

Properties

Luciad.Net.Http.HttpRequestOptions HttpRequestOptions [get, set]
 

Detailed Description

An HTTP Client, implementation of the luciad::IHttpClient interface.

An HttpClient can be used to send requests and retrieve their responses. An HttpClient is created through a builder. The builder can be used to configure client states, like: a proxy selector, an authenticator provider, etc. Example

This class is thread-safe, i.e. it can handle multiple concurrent requests. 2023.0

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::HttpClient.

Member Function Documentation

◆ ClearHttpRequestOptions()

void Luciad.Net.Http.HttpClient.ClearHttpRequestOptions ( )
inline

◆ Dispose()

void Luciad.Net.Http.HttpClient.Dispose ( )
inline

◆ NewBuilder()

static Luciad.Net.Http.HttpClient.Builder Luciad.Net.Http.HttpClient.NewBuilder ( )
inlinestatic

◆ Send() [1/2]

Luciad.Net.Http.HttpResponse Luciad.Net.Http.HttpClient.Send ( Luciad.Net.Http.HttpRequest  request)
inline

◆ Send() [2/2]

Luciad.Net.Http.HttpResponse Luciad.Net.Http.HttpClient.Send ( Luciad.Net.Http.HttpRequest  request,
Luciad.Concurrent.CancellationToken  token 
)
inline

Returns the HTTP response for the given HTTP request.

This method is synchronous and blocks until the request has been sent and the response has been received. The request process can be canceled by the means of the cancellation token. It is up to the implementer to verify that the cancellation token state is set to true during the operation. When set to true this indicates that a HTTP response is no longer needed. The return value then can be an ErrorInfo object with the error code Canceled.

request

HTTP request.

token

Cancellation token.

the HTTP response.

luciad::IOException

when loading the data fails.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IHttpClient::send.

Implements Luciad.Net.Http.IHttpClient.

Property Documentation

◆ HttpRequestOptions

Luciad.Net.Http.HttpRequestOptions Luciad.Net.Http.HttpClient.HttpRequestOptions
getset