Response<BodyType> constructor

const Response<BodyType>(
  1. BaseResponse base,
  2. BodyType? body, {
  3. Object? error,
})

A http.BaseResponse wrapper representing a response of a Chopper network call.

@GET(path: '/something')
Future<Response> fetchSomething();
@GET(path: '/items/{id}')
Future<Response<Item>> fetchItem();

Implementation

const Response(this.base, this.body, {this.error});