Class BlueskyHttpClient<TResult>
- Namespace
- idunno.Bluesky
- Assembly
- idunno.Bluesky.dll
A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.
public class BlueskyHttpClient<TResult> : AtProtoHttpClient<TResult> where TResult : classType Parameters
TResult-
The type of class to use when deserializing results from an Bluesky API call.
Inheritance
-
AtProtoHttpClient<TResult>
Inherited Members
-
AtProtoHttpClient<TResult>.Get(Uri, string, HttpClient, CancellationToken)AtProtoHttpClient<TResult>.Get(Uri, string, HttpClient, JsonSerializerOptions, CancellationToken)AtProtoHttpClient<TResult>.Get(Uri, string, AtProtoCredential?, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, ICollection<NameValueHeaderValue>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Get(Uri, string, AtProtoCredential?, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, ICollection<NameValueHeaderValue>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post(Uri, string, AtProtoCredential?, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post(Uri, string, AtProtoCredential?, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, HttpClient, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, HttpClient, JsonSerializerOptions, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, AtProtoCredential, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, AtProtoCredential, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, ICollection<NameValueHeaderValue>?, AtProtoCredential?, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, ICollection<NameValueHeaderValue>?, AtProtoCredential?, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)AtProtoHttpClient<TResult>.PostBlob(Uri, string, byte[], ICollection<NameValueHeaderValue>?, ICollection<NameValueHeaderValue>?, AtProtoCredential, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, CancellationToken)AtProtoHttpClient<TResult>.PostBlob(Uri, string, byte[], ICollection<NameValueHeaderValue>?, ICollection<NameValueHeaderValue>?, AtProtoCredential, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, CancellationToken)AtProtoHttpClient<TResult>.PostBlob(Uri, string, ReadOnlyMemory<byte>, ICollection<NameValueHeaderValue>?, ICollection<NameValueHeaderValue>?, AtProtoCredential, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, CancellationToken)AtProtoHttpClient<TResult>.MaximumResponseSizeAtProtoHttpClient<TResult>.OnSendingRequestAtProtoHttpClient<TResult>.OnResponseReceivedAtProtoHttpClient<TResult>.ErrorMapperChain
Remarks
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
Constructors
BlueskyHttpClient(string?, ICollection<NameValueHeaderValue>?, ILoggerFactory?, IMeterFactory?)
A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.
public BlueskyHttpClient(string? serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from.
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
Remarks
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
BlueskyHttpClient()
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient()BlueskyHttpClient(ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(ILoggerFactory? loggerFactory)Parameters
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
BlueskyHttpClient(string?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
Remarks
Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.
Exceptions
- ArgumentException
-
Thrown when
serviceProxyis null or white space.
BlueskyHttpClient(string?, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
Remarks
Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.
Exceptions
- ArgumentException
-
Thrown when
serviceProxyis null or white space.
BlueskyHttpClient(string, NameValueHeaderValue)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?, IMeterFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
BlueskyHttpClient(string?, ILoggerFactory?, IMeterFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from.
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
BlueskyHttpClient(string?, ICollection<NameValueHeaderValue>?, ILoggerFactory?, IMeterFactory?)
A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.
public BlueskyHttpClient(string? serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from.
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
Remarks
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
BlueskyHttpClient()
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient()BlueskyHttpClient(ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(ILoggerFactory? loggerFactory)Parameters
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
BlueskyHttpClient(string?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
Remarks
Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.
Exceptions
- ArgumentException
-
Thrown when
serviceProxyis null or white space.
BlueskyHttpClient(string?, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
Remarks
Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.
Exceptions
- ArgumentException
-
Thrown when
serviceProxyis null or white space.
BlueskyHttpClient(string, NameValueHeaderValue)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?, IMeterFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
BlueskyHttpClient(string?, ILoggerFactory?, IMeterFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from.
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
BlueskyHttpClient(string?, ICollection<NameValueHeaderValue>?, ILoggerFactory?, IMeterFactory?)
A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.
public BlueskyHttpClient(string? serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from.
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
Remarks
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
BlueskyHttpClient()
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient()BlueskyHttpClient(ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(ILoggerFactory? loggerFactory)Parameters
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
BlueskyHttpClient(string?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
Remarks
Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.
Exceptions
- ArgumentException
-
Thrown when
serviceProxyis null or white space.
BlueskyHttpClient(string?, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
Remarks
Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.
Exceptions
- ArgumentException
-
Thrown when
serviceProxyis null or white space.
BlueskyHttpClient(string, NameValueHeaderValue)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?, IMeterFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeaderNameValueHeaderValue-
An header to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.
Exceptions
- ArgumentNullException
-
Thrown when
requestHeaderis null.
BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?, ILoggerFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory)Parameters
serviceProxystring-
The service a PDS should proxy the request to.
requestHeadersICollection<NameValueHeaderValue>?-
Optional headers to add to the requests this instance makes.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from/
BlueskyHttpClient(string?, ILoggerFactory?, IMeterFactory?)
Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1
public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)Parameters
serviceProxystring?-
The service a PDS should proxy the request to.
loggerFactoryILoggerFactory?-
An optional logger factory to create loggers from.
meterFactoryIMeterFactory?-
An optional meter factory to create meters from.