Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ayush-suman committed Oct 23, 2023
1 parent e6ad08c commit 1c794e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/http_worker/io_http_worker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class DefaultHttpWorker extends HttpWorker {
final Encoding encoding = encodingForCharset(response.headers.contentType?.charset);
final String responseBody = encoding.decode(bytes);
final parsedBody = parser?.parse(responseBody);
completer.complete(Response<T>(status: response.statusCode, data: parsedBody ?? body as T));
completer.complete(Response<T>(status: response.statusCode, data: parsedBody ?? responseBody as T));
requestStoreManager.removeFromStore(id);
} catch (e) {
completer.complete(Response<T>(status: -1, error: e));
Expand Down
2 changes: 1 addition & 1 deletion lib/src/http_worker/web_http_worker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class DefaultHttpWorker extends HttpWorker {
final Encoding encoding = encodingForCharset(MediaType.parse(request.responseHeaders['content-type']??'application/octet-stream').parameters['charset']);
final String responseBody = encoding.decode(responseBytes);
final T? parsedBody = parser?.parse(responseBody);
completer.complete(Response<T>(status: request.status!, data: parsedBody ?? body as T));
completer.complete(Response<T>(status: request.status!, data: parsedBody ?? responseBody as T));
requestStoreManager.removeFromStore(id);
});

Expand Down

0 comments on commit 1c794e9

Please sign in to comment.