http_query 0.2.0
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.
QueryClientnow follows redirects itself:301/302/307/308re-issue the QUERY with its body, while303switches toGET. Adds amaxRedirectsconstructor argument,defaultMaxRedirects(10), andTooManyRedirectsException. The client sends requests withfollowRedirects = falseso it can apply these rules (thedart:iodefault would re-issue303as QUERY and drop the body on301/302/307/308). fetchResult/fetchEquivalentnow treat a present-but-emptyContent-Location/Locationthe 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, onpackage:http):query,queryString,queryJson,queryJsonInto,options,fetchResult(followsContent-Location),fetchEquivalent(followsLocation), andcheckStatus. - Accept-Query:
parseAcceptQuery/formatAcceptQueryhandling the RFC 9651 Structured Fields List syntax (quoted strings, parameters), plusmatchesMediaRangewith*/*andtype/*wildcards. - Response metadata:
ResponseInfoandDiscoveryfrom a header map, with the distinctresultUri(§2.3) vsequivalentResourceUri(§2.4). - Server helpers (framework-agnostic):
checkQueryRequest,QueryRejection(400/405/415 per RFC 10008 §2), andacceptQueryHeader. - Caching:
cacheKey.