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(pagination): add flag to optionally add params to body #3404

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

hassan254-prog
Copy link
Contributor

@hassan254-prog hassan254-prog commented Jan 30, 2025

Describe the problem and your solution

Some providers require pagination parameters to be passed as query parameters for methods other than GET. This PR introduces a flag in the proxyConfiguration that, when set to false, ensures pagination parameters are included in the request body for POST, PUT, and PATCH requests, preserving the original behavior.

@hassan254-prog hassan254-prog self-assigned this Jan 30, 2025
@hassan254-prog hassan254-prog requested a review from a team January 30, 2025 08:33
@hassan254-prog hassan254-prog marked this pull request as ready for review January 30, 2025 08:33
Copy link
Collaborator

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

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

Did you make sure it's actually possible to send a Body with GET?

@hassan254-prog
Copy link
Contributor Author

Did you make sure it's actually possible to send a Body with GET?

hmmm, it's generally not a good practice to include a body in a GET request, as GET is intended to be primarily used for retrieving data without side effects. The flag in_body is only designed to work with POST, PUT, and PATCH requests. Ultimately, it's the responsibility of the engineer implementing the integration to ensure that this flag is not set for GET requests.

@bodinsamuel
Copy link
Collaborator

Ha I see, I misread the PR desc all good 👍🏻

@khaliqgant khaliqgant self-requested a review January 30, 2025 19:37
@khaliqgant khaliqgant merged commit e781072 into master Jan 30, 2025
17 checks passed
@khaliqgant khaliqgant deleted the wari/fix-pagination branch January 30, 2025 19:38
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.

3 participants