jetset
jetset copied to clipboard
Allow function as "authorization" setting
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.