Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added null as a valid value for RequestOptions.encoding #8

Merged
merged 1 commit into from
Oct 27, 2016

Conversation

maghis
Copy link
Contributor

@maghis maghis commented Oct 23, 2016

Current "master" fails if encoding: null compiling with TS2.0 with --strictNullChecks (? optional allows only undefined, not null).

When encoding is null, request returns a binary response (content is a Buffer): marking the field only as optional with ? allows undefined - which means utf8 - but not for null (explained in https://github.com/request/request/blob/master/README.md#requestoptions-callback look for encoding).

Required value to get a binary response (content is a Buffer) as explained in https://github.com/request/request/blob/master/README.md#requestoptions-callback (look for `encoding`)
@PS-davetemplin PS-davetemplin merged commit 7b9271c into davetemplin:master Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants