Allow custom header fields to be set as an object.#190
Merged
alexindigo merged 1 commit intoform-data:masterfrom Aug 26, 2016
DylanPiercey:master
Merged
Allow custom header fields to be set as an object.#190alexindigo merged 1 commit intoform-data:masterfrom DylanPiercey:master
alexindigo merged 1 commit intoform-data:masterfrom
DylanPiercey:master
Conversation
Member
Author
|
@alexindigo I accidentally messed up this PR. It includes #163. I will fix the PR later today unless you are fine with having both in here. |
| // it becomes responsible for boundary | ||
| // (e.g. to handle extra CRLFs on .NET servers) | ||
| if (options.header) { | ||
| if (typeof options.header === 'string') { |
Member
There was a problem hiding this comment.
Do you mind to follow style we have in the code base,
I mean non-strict equals where it's not necessary. :)
Member
|
It looks a bit confusing to have it together, but in the same time, looks like it's two separate chunks of code, so we should be able to treat them separately. |
Member
|
And thanks for doing it. |
Member
Author
|
@alexindigo I made some fixes, let me know if there is anything else you want me to change. And no problem for the PR, glad to finally get it out there! |
| } | ||
|
|
||
| var header; | ||
| for (var prop in headers) { |
Member
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.