Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.0.4 #311

Merged
merged 13 commits into from
Dec 9, 2021
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 <hadrien.lejard@gmail.com>
Expand Down