microsoft / typed-rest-client

Node Rest and Http Clients with typings for use with TypeScript
Other
675 stars 118 forks source link

Headers checking in headersFromOptions is now case sensitive #97

Closed mmajcica closed 6 years ago

mmajcica commented 6 years ago

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.

This makes the comparison case sensitive.

Closes #96

damccorm commented 6 years ago

Looks good, thanks for the contribution!