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

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

Release Note #

1.1.3 #

  • chore: bump at_primitives to ^1.2.0.

1.1.2 #

  • docs: rewrote the README example, which imported non-existent atproto.Session/atproto.CurrentSession and used fictional NSIDs; it now matches the working example/example.dart (server.atproto.com/createSession/getSession, no atproto import).
  • docs: documented the streaming API (subscribe<T> returning an XRPCResponse<Subscription<T>>) with a minimal usage snippet.
  • chore: bump at_primitives to ^1.1.1.

1.1.1 #

  • fix: procedure/record request bodies no longer drop legitimately empty collections (e.g. threadgate.allow: []); only null values are stripped. Query parameters are unchanged. This now also covers the http.post body path (previously it still pruned empty []/{}).
  • fix: subscribe propagates backpressure and cancellation to the underlying WebSocket, preventing unbounded buffering on slow consumers (firehose) and socket leaks.
  • fix: subscribe no longer drains the WebSocket before a consumer listens — the underlying subscription starts paused and resumes on the first listen, so a consumer that delays or never listens cannot buffer firehose frames unboundedly.
  • fix: RateLimit.waitUntilReset() caps its delay at 60s, so a hostile or misconfigured far-future Retry-After HTTP-date can no longer hang the caller indefinitely.
  • fix: an empty 200 response body with a to converter now yields EmptyData instead of throwing a raw FormatException.
  • fix: blob uploads fall back to application/octet-stream (was */*) when the content type cannot be sniffed.

1.1.0 #

  • fix: subscribe() now closes its StreamController, propagates WebSocket errors via addError, and always delivers done, so a server disconnect no longer hangs await for forever or leaks the controller.
  • fix: non-JSON error bodies (e.g. an HTML 502 from a proxy or an empty 429) fall back to a typed exception instead of throwing a FormatException, so typed errors and retries keep working.
  • fix!: 409 Conflict is no longer treated as a success and its body is no longer parsed as a data model.
  • fix: unknown HTTP status codes (e.g. Cloudflare 520) map to HttpStatus.unknown instead of throwing UnsupportedError while building the error response.
  • fix: _buildWsUri now uses the Uri builder (percent-encoding, repeated list params, ISO8601 UTC), so multi-valued subscription params produce a valid URL.
  • fix: rate-limit header parsing is now defensive (tryParse, unlimited fallback), so a malformed header no longer turns a successful response into a crash.
  • fix: RateLimit.fromHeaders now honors the Retry-After header (delta-seconds and HTTP-date forms) when usable ratelimit-* headers are absent, so isExceeded and waitUntilReset() respect the backoff of a 429 relayed by a proxy that strips the ratelimit-* headers.
  • fix: the optional ratelimit-policy header is no longer required to parse rate limit info; responses carrying only ratelimit-limit/ratelimit-remaining/ratelimit-reset are now parsed instead of being treated as unlimited.
  • feat: injectable http.Client for connection reuse (non-breaking), plus a procedure adaptor param and subscribe protocol param.
  • chore: bump at_primitives to ^1.1.0.

1.0.3 #

  • MIGRATION: Updated to use the consolidated at_primitives package for AT Protocol primitive types.
  • IMPROVEMENT: Reduced dependency complexity by adopting unified primitive types.

1.0.2 #

  • Fix SDK constraint to '">=3.8.0 <4.0.0"'.

1.0.1 #

  • chore: optimized docs.

1.0.0 #

  • Bump SDK constraint to '^3.8.0'.

0.6.1 #

  • Use web_socket_channel: ^3.0.0.

0.6.0 #

  • Add parameter headerBuilder on query and procedure functions.

0.5.3 #

  • Just return the response when the status code is 409. (#1783)

0.5.2 #

  • Bump SDK constraint to '^3.3.0'.

0.5.1 #

  • Improved redundant error messages. Now it shows like GET https://bsky.social/xrpc/com.atproto.identity.resolveHandle 400 Error: Params must have the property "handle". (#1253)
  • Added parameters arg on .post and .procedure. (#1252)
  • Removed .upload from xrpc. You can upload from .procedure and pass bytes to body. (#1252)

0.5.0 #

  • Renamed types. (#1217)
    • From To to ResponseDataBuilder
    • From ResponseAdaptor to ResponseDataAdaptor

0.4.5 #

0.4.4 #

  • Upgrade dependencies. (#1146)

0.4.3 #

  • Don't remove empty list.

0.4.2 #

0.4.1 #

  • Added .post function. (#999)
  • Use bsky.network as default when service is missing for .subscribe function.

0.4.0 #

  • Added HTTP specific function and exposed as http/http. (#989)
    • .get

0.3.3 #

  • You can specify Uint8List as a type parameter.

0.3.2 #

  • Fixed field names for rate limits.

0.3.1 #

  • Improved documents. (#677)

0.3.0 #

  • Drop support for null unsafe Dart, bump SDK constraint to '^3.0.0'. (#599)
  • Dart3 modifier applied.

0.2.2 #

  • Supported RateLimit. You can access this property from XRPCResponse.rateLimit. If there is no rate limits, then it's always null. (#636)
  • Added .waitUntilReset method on RateLimit (#643)

0.2.1 #

  • Allows Map<String, dynamic> to be specified for generics, allowing response data to be retrieved as JSON. (#563)

0.2.0 #

  • Added homepage in pubspec.yaml. (#549)
  • Changed the argument of the upload function to byte data instead of a File object. This change allows uploads to be used without being affected by platform differences. (#556)

0.1.4 #

  • Added ResponseAdaptor and removed JsonConverter and Decoder. (#495)

0.1.3 #

  • Removed cbor dependency and car_decoder, moved to atproto_core. (#473)

0.1.2 #

  • Added decoder parameter in subscribe and delegate data decoding to the responsibility of the app that uses xrpc. (#472)

0.1.1 #

  • Added converter parameter in subscribe. (#446)

0.1.0 #

  • Updated SDK to ">=2.17.0 <4.0.0". (#406)

0.0.14 #

  • Supported subscription function as subscribe. (#318)

0.0.13 #

  • Supported protocol options in query, procedure, upload. You can choose http as a protocol for your test locally. Defaults to https. (#269)

0.0.12 #

  • Fixed upload. (#249)

0.0.11 #

  • Fixed upload. (#249)

0.0.10 #

  • Fixed structures. (#249)

0.0.9 #

  • Fixed build config. (#249)

0.0.8 #

  • Added upload function. (#249)

0.0.7 #

  • Downgrade meta to make this package compatible with Flutter. (#242)

0.0.6 #

  • Fix to pass null if body is null during POST. (#218)

0.0.5 #

  • Fixed XRPCResponse to XRPCResponse<XRPCError> in XRPCException. (#177)

0.0.4 #

  • Allow String to be set to data in XRPCResponse. (#174)

0.0.3 #

  • Fixed internal structures.

0.0.2 #

  • service and getClient/postClient are now nullable. (#146)

0.0.1 #

  • First Release.

0.0.0 #

  • Let's start.
2
likes
160
points
4.73k
downloads

Documentation

Documentation
API reference

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

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

at_primitives, freezed_annotation, http, http_parser, json_annotation, mime, web_socket_channel

More

Packages that depend on xrpc