restCall contentType
awhitford opened this issue · 2 comments
awhitford commented
This code looks invalid:
var contentType = res.headers._headers['content-type'][0];
I don't see that Headers
has a _headers
property.
Also, not sure if the case of Content-Type
matters, but the HTTP convention is Content-Type
(not content-type
).
I think it should be:
var contentType = res.headers.get('Content-Type');
rstrube commented
We are actually running into this issue. rest.headers._headers['content-type']
causes an Error, because _headers
is undefined
. Because it's res.headers
is a JS Map
the SDK should be using the get()
function to retrieve items from the map. Could the AvaTax developers comment on this? Perhaps the _headers['xxx']
is a syntax I'm unaware of?
jwenger100 commented