ServiceContext constructor
ServiceContext({
- Map<
String, String> ? headers, - Protocol? protocol,
- String? service,
- String? relayService,
- Session? session,
- OAuthSession? oAuthSession,
- Duration? timeout,
- RetryConfig? retryConfig,
- GetClient? getClient,
- PostClient? postClient,
Implementation
ServiceContext({
Map<String, String>? headers,
xrpc.Protocol? protocol,
String? service,
String? relayService,
this.session,
this.oAuthSession,
Duration? timeout,
RetryConfig? retryConfig,
final xrpc.GetClient? getClient,
final xrpc.PostClient? postClient,
}) : _headers = headers,
_protocol = protocol ?? defaultProtocol,
service =
service ??
session?.atprotoPdsEndpoint ??
oAuthSession?.atprotoPdsEndpoint ??
defaultService,
relayService = relayService ?? defaultRelayService,
_challenge = Challenge(RetryPolicy(retryConfig)),
_timeout = timeout ?? defaultTimeout,
_getClient = getClient,
_postClient = postClient;