Skip to content

Commit f8ada4c

Browse files
committed
📝 Updated documentation and example
1 parent a8e3be9 commit f8ada4c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Example:
5050
final chopperClient = ChopperClient(
5151
baseUrl: Uri.parse('https://example.com'),
5252
interceptors: [
53-
oauthChopper.interceptor,
53+
oauthChopper.interceptor(),
5454
],
5555
);
5656

example/oauth_chopper_example.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ void main() {
2020
/// Add the oauth authenticator and interceptor to the chopper client.
2121
final chopperClient = ChopperClient(
2222
baseUrl: Uri.parse('https://example.com'),
23-
authenticator: oauthChopper.authenticator(),
2423
interceptors: [
25-
oauthChopper.interceptor,
24+
oauthChopper.interceptor(),
2625
],
2726
);
2827

lib/src/oauth_chopper.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ class OAuthChopper {
6565
}
6666

6767
/// Provides an [OAuthInterceptor] instance.
68+
/// If [onError] is provided exceptions will be passed to [onError] and not be
69+
/// thrown.
6870
OAuthInterceptor interceptor({
6971
OnErrorCallback? onError,
7072
}) =>

0 commit comments

Comments
 (0)