Fix Response Headers to pass the tests#75
Open
dvinubius wants to merge 1 commit intofreeCodeCamp:mainfrom
Open
Fix Response Headers to pass the tests#75dvinubius wants to merge 1 commit intofreeCodeCamp:mainfrom
dvinubius wants to merge 1 commit intofreeCodeCamp:mainfrom
Conversation
There is a test for each of the three post requests (contract call, get balance, transfer) which expects `'Content-Type'` to be `'application/json'` on the response header. (The test description is misleading though, because is refers to the request header) Express automatically adds `'charset=UTF-8'`, which makes the test fail. The changes in this PR fix the issue.
Member
There was a problem hiding this comment.
Hello there,
Thank you for taking the time to contribute.
As far as I can see, this has no impact on the application whatsoever. The tests are written in the Markdown files, and they get their headers from the _tests array in this file.
Would you mind expanding on what this change is supposed to resolve?
Also, please review the link in the checklist for the recommended PR title.
Contributor
Author
|
Hi, I think the title is pretty descriptive, maybe you can suggest an improvement, given the suggested changes and the issue that they fix? |
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.
There is a test for each of the three post requests (contract call, get balance, transfer) which expects 'Content-Type' to be 'application/json' on the response header. (The test description is misleading though, because is refers to the request header while the fail results from a check on the response header)
The issue comes from Express automatically adding 'charset=UTF-8'.
Checklist:
Update index.md)Closes #XXXXX