ServiceContext constructor

ServiceContext({
  1. Map<String, String>? headers,
  2. Protocol? protocol,
  3. String? service,
  4. String? relayService,
  5. Session? session,
  6. OAuthSession? oAuthSession,
  7. Duration? timeout,
  8. RetryConfig? retryConfig,
  9. GetClient? getClient,
  10. 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;