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
Pass payload data to query params for GET requests #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some thoughts.
method, | ||
} = options | ||
const method = options.method.toUpperCase() | ||
const resolvedURL = new URL(options.base + url) |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Once it's merged, and we have test coverage, we can play further for byte-shaving :) |
@kwhitley I added tests for the changes, did you see something missing? |
Added tests. Note that I had to move the tests into a
beforeEach
so I can assert against thecalls
otherwise I get all them mock calls in the test.Adds about 110 bytes, not sure if it is possible to reduce further.