DVBillingFetch typedef

DVBillingFetch = Future<(int, String)> Function(String method, Uri url, Map<String, String> headers, String? body)

(status, body) for an HTTP method request to url with headers.

body is null for a read. It used to be a required String and the method was implied, which meant a provider could only write -- and a provider that cannot read cannot check what a price actually costs before sending somebody to pay it.

Implementation

typedef DVBillingFetch = Future<(int, String)> Function(
  String method,
  Uri url,
  Map<String, String> headers,
  String? body,
);