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

Update paramsSerializer Documentation to Include Object Assignment with serialize and encode Fields #194

Open
Gn0lee opened this issue Jul 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Gn0lee
Copy link

Gn0lee commented Jul 20, 2024

Describe the bug
The current axios documentation on paramsSerializer is insufficient and does not cover the new method of assigning an object with serialize and encode fields. This omission leads to confusion as users cannot specify custom encoding when they assign a function to paramsSerializer, as it defaults to axios’ basic encoding.

To Reproduce
Steps to reproduce the behavior:

  1. Refer to the current axios documentation on paramsSerializer.
  2. Assign a function to paramsSerializer in the axios configuration.
  3. Attempt to define custom encoding.
  4. Observe that the documentation does not explain how to properly assign paramsSerializer as an object with serialize and encode fields, leading to the issue where custom encoding cannot be specified.

Expected behavior
The documentation should clearly explain that paramsSerializer needs to be assigned an object containing serialize and encode fields. This change should be highlighted to ensure users understand how to specify custom encoding correctly.

Screenshots
image

Desktop (please complete the following information):

  • All devices

Smartphone (please complete the following information):

  • All devices

Additional context
To improve the documentation, a section should be added demonstrating the correct usage of paramsSerializer with an object. This should include examples and explanations of the serialize and encode fields, emphasizing the difference from the previous method of assigning a function directly. This update will help prevent confusion and ensure proper implementation of custom encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant