Skip to content

Commit

Permalink
86. Read append-header extra
Browse files Browse the repository at this point in the history
  • Loading branch information
foxanna committed Sep 11, 2022
1 parent de6d843 commit 529a0bc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class ExampleInterceptor extends Interceptor {
options.headers['access-key'] = accessKey;
}

final appendHeader = options.extra['append-header'] ?? false;
if (appendHeader) {
options.headers['header'] = 'header-value';
}
options.extra.remove('append-header');

return super.onRequest(options, handler);
}
}
Expand Down

0 comments on commit 529a0bc

Please sign in to comment.