Skip to content

Fix invalid body data when Content-Type is application/json #312

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

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

Conversation

ddbdzung
Copy link

@ddbdzung ddbdzung commented Mar 9, 2025

Issue Reference : #331 , #4861 , #4857

Problem

Axios requests with Content-Type: application/json were not properly serialized, causing incorrect payloads.

Solution

  • Convert request body to a JSON string using JSON.stringify().
  • Ensure consistency when sending JSON data.

Impact

✅ Fixes incorrect payload formatting.
✅ Ensures API compatibility.

@ddbdzung ddbdzung closed this Mar 11, 2025
@CuriousCorrelation
Copy link
Member

Hi @ddbdzung, this PR you raised is a good way to fix the serialization issue on the extension side, the current PR raised at the mono-repo around similar ser/de issue addresses several additional concerns including other interceptors and maintaining backwards compatibility. So please feel free to keep this PR open for future considerations. Thanks!

@ddbdzung ddbdzung reopened this Mar 12, 2025
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.

2 participants