toBaseRequest method

Future<BaseRequest> toBaseRequest()

Converts this Chopper Request into a http.BaseRequest.

All parameters and headers are conserved.

Depending on the request type the returning object will be:

Implementation

Future<http.BaseRequest> toBaseRequest() async {
  if (body is Stream<List<int>>) return toStreamedRequest(body);

  if (multipart) return toMultipartRequest();

  return toHttpRequest();
}