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: GET请求中api.data未追加到query中问题 #7214

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

lurunze1226
Copy link
Collaborator

@lurunze1226 lurunze1226 commented Jun 19, 2023

What

🤖 Generated by Copilot at 7b654ca

This pull request enhances the api object and its related functions to support more flexible query string manipulation. It allows the user to specify how the context data should be merged with or appended to the query parameters for different API methods.

🤖 Generated by Copilot at 7b654ca

The query of doom, you can't escape it
merge or forceAppend, you must shape it
The api object holds the key
To unleash the power of attachDataToQuery

Why

How

🤖 Generated by Copilot at 7b654ca

  • Add a merge parameter to attachDataToQuery function to control whether to merge or overwrite query parameters with context data (link, link)
  • Use api.attachDataToQuery to decide which data object to use as context data and whether to merge or overwrite query parameters in buildApi function (link)
  • Use api.forceAppendDataToQuery to always append data object to query parameters when using JSONQL methods in buildApi function (link)

@github-actions github-actions bot added the fix label Jun 19, 2023
@github-actions
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@2betop 2betop merged commit c644ef4 into baidu:master Jun 19, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants