jetset icon indicating copy to clipboard operation
jetset copied to clipboard

Allow function as "authorization" setting

Open BorisTB opened this issue 6 years ago • 0 comments

token can change over time, It would definitely be better to set it before each request and not setting it only once, when app loads (I'm using apiDecorator).

e.g.:

const api = apiDecorator({
  url: 'http://example.com'
  authorization: () => `Bearer ${getToken()}`
})

This is kind of deal breaker for me, otherwise this looks like a really amazing library.

BorisTB avatar May 06 '19 10:05 BorisTB