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

Auto JSON.stringify for POST Requests #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

darseen
Copy link
Contributor

@darseen darseen commented Aug 13, 2024

Description

This PR fixes #202 where users were required to manually convert their data to a string using JSON.stringify for some POST requests. With this fix, data will now be automatically stringified before being sent in POST requests.

I discovered this issue when I was rewriting the codebase in TypeScript for the unofficial package amadeus-ts, and decided to fix it for the official package as well.

Changes Made

  • Added functionality to automatically apply JSON.stringify to objects in POST requests.
  • Updated tests to expect automatically stringified objects for POST requests.
  • Ensured all existing tests are passing.
  • Manually tested all endpoints to confirm functionality.

Testing

  • Unit Tests: All relevant tests have been updated and are passing successfully.
  • Manual Testing: Each endpoint was manually tested to ensure correct behavior after the update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant