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.

example/http_query_example.dart

import 'package:http_query/http_query.dart';

/// Sends a QUERY request and prints the status and any advertised result URI.
Future<void> main() async {
  final client = QueryClient();
  try {
    final resp = await client.queryString(
      'https://example.org/search',
      'application/sql',
      'select surname, email from contacts limit 10',
    );

    print('status: ${resp.statusCode}');

    final info = ResponseInfo.fromHeaders(resp.statusCode, resp.headers);
    if (info.resultUri != null) {
      print('result stored at: ${info.resultUri}');
    }
  } finally {
    client.close();
  }
}
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