toResponse method

Response toResponse(
  1. RequestOptions options, {
  2. bool fromNetwork = false,
})

Implementation

Response toResponse(RequestOptions options, {bool fromNetwork = false}) {
  return Response(
    data: deserializeContent(options.responseType, content),
    extra: {cacheKey: key, CacheResponse.fromNetwork: fromNetwork},
    headers: getHeaders(),
    statusCode: 304,
    requestOptions: options,
  );
}