build method

  1. @override
Future<Response> build()
override

Implementation

@override
Future<Response> build () async {
  final request = Request(httpMethod.uid, Uri.parse('$httpBaseUrl$httpUrl'))
    ..body = jsonEncode(httpPayload)
    ..headers.addAll(httpHeaders);

  StreamedResponse response = await request.send();

  return Response.bytes(await response.stream.toBytes(), response.statusCode);
}