http_query 0.2.0 copy "http_query: ^0.2.0" to clipboard
http_query: ^0.2.0 copied to clipboard

A client and server SDK for the HTTP QUERY method (RFC 10008) — safe, idempotent requests carrying a query body.

0.2.0 #

  • RFC 10008 §2.5 redirect handling. QueryClient now follows redirects itself: 301/302/307/308 re-issue the QUERY with its body, while 303 switches to GET. Adds a maxRedirects constructor argument, defaultMaxRedirects (10), and TooManyRedirectsException. The client sends requests with followRedirects = false so it can apply these rules (the dart:io default would re-issue 303 as QUERY and drop the body on 301/302/307/308).
  • fetchResult / fetchEquivalent now treat a present-but-empty Content-Location / Location the same as absent (throws) instead of issuing a spurious GET to the original URL.

0.1.0 #

Initial release: a client and server SDK for the HTTP QUERY method (RFC 10008).

  • Client (QueryClient, on package:http): query, queryString, queryJson, queryJsonInto, options, fetchResult (follows Content-Location), fetchEquivalent (follows Location), and checkStatus.
  • Accept-Query: parseAcceptQuery / formatAcceptQuery handling the RFC 9651 Structured Fields List syntax (quoted strings, parameters), plus matchesMediaRange with */* and type/* wildcards.
  • Response metadata: ResponseInfo and Discovery from a header map, with the distinct resultUri (§2.3) vs equivalentResourceUri (§2.4).
  • Server helpers (framework-agnostic): checkQueryRequest, QueryRejection (400/405/415 per RFC 10008 §2), and acceptQueryHeader.
  • Caching: cacheKey.
0
likes
160
points
107
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A client and server SDK for the HTTP QUERY method (RFC 10008) — safe, idempotent requests carrying a query body.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

crypto, http

More

Packages that depend on http_query