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

fix(carto): Fix broken encoding in POST requests #8865

Merged
merged 7 commits into from May 6, 2024

Conversation

donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy commented May 3, 2024

Fixes two issues occurring when URL lengths exceed the limit for GET requests, and we switch to POST requests.

  • Ensure DEFAULT_PARAMETERS are applied the same way for GET and POST requests
  • Defer JSON.stringify() encoding in *QuerySource() and *TableSource() functions, because we don't know yet whether the request will be GET or POST. Ensure that requestWithParameters applies the necessary string encoding (for GET requests only) instead.

@coveralls
Copy link

coveralls commented May 3, 2024

Coverage Status

coverage: 89.807% (+0.001%) from 89.806%
when pulling 8cf2d95 on donmccurdy/fix-carto-post-request-encoding
into 2604ca5 on master.

@@ -45,7 +45,7 @@ export const vectorTableSource = async function (
urlParameters.columns = columns.join(',');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if the API should accept columns as JSON also, would be nicer not to special case it

@felixpalmer felixpalmer merged commit 280a07d into master May 6, 2024
2 checks passed
@felixpalmer felixpalmer deleted the donmccurdy/fix-carto-post-request-encoding branch May 6, 2024 07:26
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