Skip to content

Comments

Fix HTTParty content type for nil request bodies (#536)#540

Open
AaronDDM wants to merge 3 commits intomainfrom
issue-536
Open

Fix HTTParty content type for nil request bodies (#536)#540
AaronDDM wants to merge 3 commits intomainfrom
issue-536

Conversation

@AaronDDM
Copy link
Contributor

Summary

Fixes HTTParty content type issue when request body is nil.

Changes

  • API Operations: POST, PUT, PATCH, and DELETE now default payload to {} when request_body is nil to ensure Content-Type: application/json is sent (HTTParty omits the header when payload is nil)
  • DELETE: Added request_body parameter support (e.g. cancellation_reason for bookings)
  • Bookings: destroy now accepts optional request_body for cancellation reasons

- Default POST, PUT, PATCH, DELETE payload to {} when request_body is nil
  to ensure Content-Type: application/json is sent
- Add request_body support to DELETE (e.g. cancellation_reason for bookings)
- Updated comments for POST, PUT, PATCH, and DELETE methods to improve readability and maintain consistency in parameter descriptions.
- Ensured that the documentation accurately reflects the behavior of each method, including default values for request bodies and additional headers.
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.

1 participant