formResponse<T> static method

ResponseModel<T> formResponse<T>(
  1. Response<T> response, {
  2. DioErrorType? type,
  3. BaseOptions? baseOptions,
})

Implementation

static ResponseModel<T> formResponse<T>(Response<T> response,
        {DioErrorType? type, BaseOptions? baseOptions}) =>
    ResponseModel<T>(
        baseOptions: baseOptions,
        requestOptions: response.requestOptions,
        type: type.toString(),
        statusCode: response.statusCode,
        statusMessage: response.statusMessage,
        data: response.data,
        extra: response.extra,
        headers: response.headers,
        redirects: response.redirects,
        response: response);