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

Add response constructors #64

Merged
merged 1 commit into from
Dec 24, 2021

Conversation

tom-sherman
Copy link
Contributor

Closes #63

@@ -6,6 +6,7 @@ type body
type bodyInit
type headers
type headersInit
type responseInit
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if I should add alias the types from the top level or not as it says they are here for compatibility purposes. Let me know if I should remove them 👍

Copy link
Owner

Choose a reason for hiding this comment

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

This is fine. We can re-evaluate these for the eventual rewrite of the bindings.

Copy link
Owner

@TheSpyder TheSpyder left a comment

Choose a reason for hiding this comment

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

Looks good.

I wonder why the Response methods were not wrapped in decoders while the Request methods were 🤔 since we're updating it anyway, can you please add one for Response.type_ so it matches what happens with Request.type_? I don't think any of the others need a decoder.

[edit] I was wrong, see below

@@ -6,6 +6,7 @@ type body
type bodyInit
type headers
type headersInit
type responseInit
Copy link
Owner

Choose a reason for hiding this comment

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

This is fine. We can re-evaluate these for the eventual rewrite of the bindings.

@TheSpyder
Copy link
Owner

TheSpyder commented Dec 22, 2021

Oh I just read your other PR 🤣 ok maybe remove type_ from the response as well

[edit] never mind response type is an entirely different concept, I should read the specs before commenting...
https://developer.mozilla.org/en-US/docs/Web/API/Response/type

@TheSpyder
Copy link
Owner

I forgot to ask for a changelog, but I'll add it before publishing the release

@TheSpyder TheSpyder merged commit 7c8e719 into TheSpyder:main Dec 24, 2021
TheSpyder added a commit that referenced this pull request Dec 24, 2021
@TheSpyder
Copy link
Owner

Published as 0.3.0

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.

Request and Response constructors?
2 participants