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

Content-Type header is not set while constructing Request object #1016

Closed
orionmiz opened this issue Aug 9, 2023 · 1 comment
Closed

Content-Type header is not set while constructing Request object #1016

orionmiz opened this issue Aug 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@orionmiz
Copy link
Contributor

orionmiz commented Aug 9, 2023

Describe the bug
Content-Type header is not set while constructing Request object.

To Reproduce

const request = new Request(TEST_URL, { method: "POST", body: "Hello World" })
console.log(request.headers.get("Content-Type")) // null

Expected behavior
Above request.headers.get("Content-Type") should return "text/plain;charset=UTF-8"

Additional context
I'll fix it.

@orionmiz orionmiz added the bug Something isn't working label Aug 9, 2023
orionmiz added a commit to orionmiz/happy-dom that referenced this issue Aug 9, 2023
capricorn86 added a commit that referenced this issue Aug 15, 2023
…-header

#1016@minor: Add Content-Type header for Request.
@capricorn86
Copy link
Owner

Your fix has been released and is available here:
https://github.com/capricorn86/happy-dom/releases/tag/v10.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants