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

Pass payload data to query params for GET requests #6

Merged

Conversation

danawoodman
Copy link
Collaborator

Added tests. Note that I had to move the tests into a beforeEach so I can assert against the calls otherwise I get all them mock calls in the test.

Adds about 110 bytes, not sure if it is possible to reduce further.

Copy link
Contributor

@Crisfole Crisfole left a comment

Choose a reason for hiding this comment

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

Just some thoughts.

src/itty-fetcher.ts Outdated Show resolved Hide resolved
method,
} = options
const method = options.method.toUpperCase()
const resolvedURL = new URL(options.base + url)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the + is likely to be contentious or need documentation...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That was already existing. I would prefer to do a more intelligent concatenation tho

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a reference to #2 not your fault.

@kwhitley
Copy link
Owner

Added tests. Note that I had to move the tests into a beforeEach so I can assert against the calls otherwise I get all them mock calls in the test.

Adds about 110 bytes, not sure if it is possible to reduce further.

Once it's merged, and we have test coverage, we can play further for byte-shaving :)

@danawoodman
Copy link
Collaborator Author

@kwhitley I added tests for the changes, did you see something missing?

@kwhitley kwhitley merged commit 5910258 into kwhitley:v0.x Sep 30, 2022
@danawoodman danawoodman deleted the set-playload-in-querystring-for-get-request branch September 30, 2022 20:21
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.

None yet

3 participants