Skip to content

Commit

Permalink
docs: clean docs
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Dec 5, 2023
1 parent 963cfa9 commit 69dda3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/interceptors/examples/requestHeadersInterceptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const axle = createAxle()

axle.useRequestInterceptor(
requestHeadersInterceptor({
// additional headers carried by the request
// additional headers carried by the request
headers: {
'Custom-Field': 'custom-field'
},

// optional filtering options that determine whether the interceptor intercepts
// optional filtering options that determine whether the interceptor intercepts
include: ['method:get', 'method:post'],
exclude: ['/user/**'],
})
Expand All @@ -26,13 +26,13 @@ const axle = createAxle()

axle.useRequestInterceptor(
requestHeadersInterceptor({
// headers can also be a getter
// headers can also be a getter
headers: () => ({
'Authorization': localStorage.getItem('token'),
'Custom-Field': 'custom-field',
}),

// optional filtering options that determine whether the interceptor intercepts
// optional filtering options that determine whether the interceptor intercepts
include: ['method:get', 'method:post'],
exclude: ['/user/**'],
})
Expand Down

0 comments on commit 69dda3b

Please sign in to comment.