while trying to send a custom header in options:
authenticatedFetch(app,fetch)(uri, options: { headers:{ 'Content-Type':'application/json' } }, body:body );
the headers will reset to "content-type: text/plain",
as the auth header will replace any previous header and will set everything to default
To Reproduce
Steps to reproduce the behavior:
set the custom header on options
send authenticatedFetch with that options object
check to call in dev tools to see if the custom header persisted
Expected behavior
the method should add the authentication header in addition to existing headers
Contextual information
missing 'Content-Type':'application/json' on the call will cause the body to not being parsed by middleware like 'koa-bodyparser'
Packages and versions
List the relevant packages you’re using, and their versions. For example:
server:
Describe the bug
while trying to send a custom header in options:
authenticatedFetch(app,fetch)(uri, options: { headers:{ 'Content-Type':'application/json' } }, body:body );
the headers will reset to "content-type: text/plain", as the auth header will replace any previous header and will set everything to defaultTo Reproduce
Steps to reproduce the behavior:
Expected behavior
the method should add the authentication header in addition to existing headers
Contextual information
missing 'Content-Type':'application/json' on the call will cause the body to not being parsed by middleware like 'koa-bodyparser'
Packages and versions
List the relevant packages you’re using, and their versions. For example: server:
client:
Platform
Additional context
using Node package