Skip to content

Commit

Permalink
Fixes for #309 #308 (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
JEuler committed Oct 8, 2022
1 parent 1a7987c commit ca6cf22
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit ca6cf22

Please sign in to comment.