optionsJSON method

Future optionsJSON(
  1. String path, {
  2. Map<String, String>? headers,
  3. Credential? authorization,
  4. Map<String, Object?>? parameters,
})

Does an OPTION request and returns a decoded JSON.

Implementation

Future<dynamic> optionsJSON(String path,
    {Map<String, String>? headers,
    Credential? authorization,
    Map<String, Object?>? parameters}) async {
  return options(path,
          headers: headers,
          authorization: authorization,
          parameters: parameters)
      .then((r) => _jsonDecode(r.bodyAsString));
}