Skip to content

Commit

Permalink
Release 4.0.4 (#311)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Terekhin <[email protected]>
Co-authored-by: Youssef Raafat <[email protected]>
Co-authored-by: luis901101 <[email protected]>
Co-authored-by: melvspace <[email protected]>
  • Loading branch information
4 people authored Dec 9, 2021
1 parent d22fe0f commit 898fd35
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions chopper/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.0.4

- Fix for authenticator usage

## 4.0.3

- Fix for authenticator usage
Expand Down
8 changes: 6 additions & 2 deletions chopper/lib/src/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ class ChopperClient {
dynamic res = Response(response, response.body);

if (authenticator != null) {
var updatedRequest = await authenticator!.authenticate(request, res);
var updatedRequest = await authenticator!.authenticate(req, res);

if (updatedRequest != null) {
res = await send<BodyType, InnerType>(updatedRequest);
res = await send<BodyType, InnerType>(
updatedRequest,
requestConverter: requestConverter,
responseConverter: responseConverter,
);
// To prevent double call with typed response
if (_responseIsSuccessful(res.statusCode)) {
return _processResponse(res);
Expand Down
2 changes: 1 addition & 1 deletion chopper/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: chopper
description: Chopper is an http client generator using source_gen, inspired by Retrofit
version: 4.0.3
version: 4.0.4
documentation: https://hadrien-lejard.gitbook.io/chopper
repository: https://github.com/lejard-h/chopper
author: Hadrien Lejard <[email protected]>
Expand Down

0 comments on commit 898fd35

Please sign in to comment.