Skip to content

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

Open
@Gn0lee

Description

@Gn0lee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions