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

fix typo where headers was not being used and thus sent wrong content-type #643

Merged
merged 1 commit into from
Jun 8, 2018

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Apr 30, 2018

higher up this method copies opts.headers into headers and if json && data then sets the content-type to application/json
Whilst writing matrix-search I was left with js-sdk reaching out to the express server with some json payload but plain text content type

Signed-off-by: Michael Telatynski 7t3chguy@gmail.com

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy changed the title fix typo where headers was not being used and thus sent wrong mime fix typo where headers was not being used and thus sent wrong content-type Apr 30, 2018
@richvdh richvdh removed their assignment May 21, 2018
@t3chguy t3chguy assigned richvdh and unassigned richvdh May 24, 2018
Copy link
Member

@ara4n ara4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. hope it doesn’t break anything relying on the bad behaviour...

@t3chguy
Copy link
Member Author

t3chguy commented Jun 8, 2018

It'd only break things if the server was expecting JSON with a content-type of text/plain
which I'm hoping no-one did :')

@t3chguy t3chguy merged commit b7208c1 into develop Jun 8, 2018
@t3chguy t3chguy deleted the t3chguy/content-type-bugfix branch March 1, 2021 10:25
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.

3 participants