xrpc 1.0.3 copy "xrpc: ^1.0.3" to clipboard
xrpc: ^1.0.3 copied to clipboard

Core library for XRPC communication. This is a wrapped HTTP client for AT Protocol.

example/example.dart

import 'dart:convert';

import 'package:xrpc/xrpc.dart' as xrpc;

Future<void> main() async {
  final response = await xrpc.procedure<String>(
    xrpc.NSID.create('server.atproto.com', 'createSession'),
    body: {'identifier': 'HANDLE_OR_EMAIL', 'password': 'PASSWORD'},
  );

  final session = jsonDecode(response.data);

  final currentSession = await xrpc.query<String>(
    xrpc.NSID.create('server.atproto.com', 'getSession'),
    headers: {'Authorization': 'Bearer ${session['accessJwt']}'},
  );

  print(currentSession);
}
2
likes
160
points
5.36k
downloads

Publisher

verified publisheratprotodart.com

Weekly Downloads

Core library for XRPC communication. This is a wrapped HTTP client for AT Protocol.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#atproto #bluesky #http #xrpc

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

at_primitives, freezed_annotation, http, json_annotation, mime, web_socket_channel

More

Packages that depend on xrpc