Skip to content

body of Request should be optional #2

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

Closed
wants to merge 1 commit into from
Closed

body of Request should be optional #2

wants to merge 1 commit into from

Conversation

sectore
Copy link
Contributor

@sectore sectore commented Sep 8, 2017

to support Request objects of the Fetch standard as well. The fetch specification does not support body for requests in some cases:

If either init’s body member is present and is non-null or inputBody is non-null, and request’s method is GET or HEAD, then throw a TypeError.

(Quote of #36 https://fetch.spec.whatwg.org/#dom-request)

Ignoring this ^ will thrown errors such as Request with GET/HEAD method cannot have body , see "GET/HEAD method cannot have body".

@chrisdotcode
Copy link
Owner

Yes, that's a good point. HEADs don't have a body. I'll check this out when I have some time later today/tomorrow :)

@sectore
Copy link
Contributor Author

sectore commented Nov 1, 2017

@chrisdotcode Friendly ping ^

@chrisdotcode
Copy link
Owner

chrisdotcode commented Jan 22, 2018

Hey @sectore, sorry for my unfriendly ping response time.

I'm fairly busy at the moment with work, but very shortly, I'll check this out.

Thanks again for the contribution!

@chrisdotcode
Copy link
Owner

Well...

Several days late and two dollars short, this library likely won't build with current PureScript versions anymore, and is likely superseded by something else.

If @sectore or anyone else still cares 2 years later, I'll enthusiastically spend some time updating this to the latest PS version and republish it with this, and whatever other fixes are needed.

@chrisdotcode chrisdotcode mentioned this pull request Mar 3, 2023
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.

2 participants