Skip to content

fix: Incorrectly attempting to send body in GET, DELETE requests #169

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

Merged
merged 3 commits into from
Feb 8, 2025

Conversation

cbaker6
Copy link

@cbaker6 cbaker6 commented Feb 8, 2025

PR #164 introduced the ability to GET and DELETE to add functionality for channel management. Previously, the API could only POST, which always required a body to be sent. In cases of GET and DELETE, a body shouldn't be sent. #164 attempts to only send a body when necessary but incorrectly assumes the body is an Object when it is always a JSON string.

This checks against an empty JSON string and adds a test to verify the body is a JSON string and not an Object.

Closes: #168

Copy link

parse-github-assistant bot commented Feb 8, 2025

Thanks for opening this pull request!

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.79%. Comparing base (4eb3686) to head (04bc450).
Report is 20 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
+ Coverage   93.53%   95.79%   +2.25%     
==========================================
  Files          23       23              
  Lines         588      832     +244     
==========================================
+ Hits          550      797     +247     
+ Misses         38       35       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cbaker6 cbaker6 marked this pull request as draft February 8, 2025 14:45
@cbaker6 cbaker6 marked this pull request as ready for review February 8, 2025 15:14
@cbaker6 cbaker6 closed this Feb 8, 2025
@cbaker6 cbaker6 reopened this Feb 8, 2025
@cbaker6
Copy link
Author

cbaker6 commented Feb 8, 2025

@mtrezza this is ready for review

@mtrezza mtrezza changed the title fix: Attempting to send body in GET/DELETE requests fix: Incorrectly attempting to send body in GET, DELETE requests Feb 8, 2025
@mtrezza mtrezza merged commit 7ca2681 into parse-community:master Feb 8, 2025
11 of 12 checks passed
parseplatformorg pushed a commit that referenced this pull request Feb 8, 2025
## [6.4.1](6.4.0...6.4.1) (2025-02-08)

### Bug Fixes

* Incorrectly attempting to send body in `GET`, `DELETE` requests ([#169](#169)) ([7ca2681](7ca2681))
@parseplatformorg
Copy link

🎉 This change has been released in version 6.4.1

@cbaker6 cbaker6 deleted the fixGetBody branch February 8, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect request.write validation in GET/DELETE requests
3 participants