Skip to content

body of Request should be optional - #2

Closed
sectore wants to merge 1 commit into
chrisdotcode:masterfrom
sectore:fix/optional-body
Closed

sectore wants to merge 1 commit into
chrisdotcode:masterfrom
sectore:fix/optional-body

Conversation

@sectore

@sectore sectore commented Sep 8, 2017 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

sectore commented Nov 1, 2017

Copy link
Copy Markdown
Contributor Author

@chrisdotcode Friendly ping ^

@chrisdotcode

chrisdotcode commented Jan 22, 2018 •

Copy link
Copy Markdown
Owner

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
Copy Markdown
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