You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// api
await instance.post(`${API_PATH.user}/parsing-text`, body);
// error
415 Unsupported Media Type
Describe the bug
When fetch sets formdata to body without specifying the content-type, the browser automatically sets the content-type.
However, in the case of fetch-ax, an error occurs because the default value of content-type is set to application/json. I think we should remove the default value of content-type.
Additional context
Previously, the reason fetch-ax set the default value of content-type to application/json was because of the expectation that json format would be sent as the body most often.
To satisfy this intention, logic will be added to check the body when requesting and, if it is a json type, automatically set application/json to the content-type.
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
fetch-ax 2.0.3 version
Reproduction
Describe the bug
When fetch sets formdata to body without specifying the content-type, the browser automatically sets the content-type.
However, in the case of fetch-ax, an error occurs because the default value of content-type is set to application/json. I think we should remove the default value of content-type.
Additional context
Previously, the reason fetch-ax set the default value of content-type to application/json was because of the expectation that json format would be sent as the body most often.
To satisfy this intention, logic will be added to check the body when requesting and, if it is a json type, automatically set application/json to the content-type.
Logs
No response
The text was updated successfully, but these errors were encountered: