Open mrctrifork opened 3 months ago
If you create the client like so:
treaty<App>('http://localhost:4000', { onRequest: (path, options) => { const token = localStorage.get('token'); if( token ) { return { headers: { Authorization: `Bearer ${token}` } } } } })
Ends up sending the request as follows:
GET / ...headers authorization: Bearer token, Bearer token
If you send the header in lowercase it works as expected
If you create the client like so:
Ends up sending the request as follows:
If you send the header in lowercase it works as expected