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 authored Dec 7, 2021
1 parent f7255b7 commit ddefa94
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 ddefa94

Please sign in to comment.