Closed mmajcica closed 6 years ago
That makes sense to me, if you request a PR I can approve.
@damccorm when can I expect to see this in a package on npmjs as it will make my code cleaner?
Thanks
@bryanmacfarlane can we release 1.0.11?
sure
done
Thanks!
In the rest client there is a check if additional headers are specified.
https://github.com/Microsoft/typed-rest-client/blob/7186708f6f5ed96c6c5ca204405915595d5b2149/lib/RestClient.ts#L171
In case user specifies a custom Content-Type header (necessary at example in case we are using uploadStream to upload a file via mutipart/formdata standard (RFC 2388) the default one will not be added. The problem is that the check over Content-Type header is case sensitive, so if you added a content-type header, this will not be detected and used correctly.
I would suggest to use a non case sensitive check for this. If you guys do agree with me, I have a code ready and I'll request a PR.
Thanks