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
I'm using Postman to access an API and on checking console the requested data was calculated as below by Postman :
I used exactly the same request body and headers and tried accessing that POST endpoint but I got a 403 error which depends on content-length and on checking the length calculated by Axios is different as compared to Postman one :
How can that be fixed?
Suggested Improvement
How it is calculating the same?
Relevant File(s)
No response
The text was updated successfully, but these errors were encountered:
@angelalawrence123 , this is a pretty big diffrence between postman and axios. You should make sure that everything is good on your side:
Ensure that the content of the request body is identical between Postman and Axios. Even small differences in payload content, such as whitespace or encoding, can result in different byte lengths.
Check that both Postman and Axios are serializing the request body in the same format. For example, if you're sending JSON data, make sure that the serialization process is consistent and produces the same result in both environments.
Verify that the Content-Type header and any other relevant headers are identical between Postman and Axios.
Ensure that character encoding settings are consistent between Postman and Axios. Encoding differences can lead to variations in byte length, especially for non-ASCII characters.
If you have snippets of your code, I will have an easier time diagnosing your problem.
Section/Content To Improve
I'm using Postman to access an API and on checking console the requested data was calculated as below by Postman :
I used exactly the same request body and headers and tried accessing that POST endpoint but I got a 403 error which depends on content-length and on checking the length calculated by Axios is different as compared to Postman one :
How can that be fixed?
Suggested Improvement
How it is calculating the same?
Relevant File(s)
No response
The text was updated successfully, but these errors were encountered: