fetchWithTypedData<T> function

Future<FetchResponse> fetchWithTypedData<T>(
  1. FetchOptions options,
  2. T typedData, {
  3. HttpxClient? httpxClient,
  4. TypedDataEncoder? encoder,
})

Implementation

Future<FetchResponse> fetchWithTypedData<T>(
  FetchOptions options,
  T typedData, {
  HttpxClient? httpxClient,
  TypedDataEncoder? encoder,
}) async {
  final fetchRequest = await fetch(options, httpxClient: httpxClient);

  return fetchRequest.writeTypedData(typedData, encoder: encoder);
}