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
Describe the bug
While using axios i noticed that axios is giving different response as expected and as obtained in postman app. the data object had some additional parameters. i have added response obtained form both the applications below and also attached the collection and the code snippet i used to run the request.
To Reproduce
run the below code snippet on nodejs and then run the bellow collection in postman app and check the output result postman collection
varaxios=require('axios');axios.post('https://postman-echo.com/post',{'headers': {'Content-Type': 'text/plain'},body: "Duis posuere augue vel cursus pharetra. In luctus a ex nec pretium. Praesent neque quam, tincidunt nec leo eget, rutrum vehicula magna.\nMaecenas consequat elementum elit, id semper sem tristique et. Integer pulvinar enim quis consectetur interdum volutpat. !@#$%^&*()_+-=,.<>/?"}).then((response)=>{console.log(response.data);}).catch((err)=>{console.log(err);});
Expected behavior
to get response data as shown below
{
"args": {},
"data": "Duis posuere augue vel cursus pharetra. In luctus a ex nec pretium. Praesent neque quam, tincidunt nec leo eget, rutrum vehicula magna.\nMaecenas consequat elementum elit, id semper sem tristique et. Integer pulvinar enim quis consectetur interdum volutpat. !@#$%^&*()_+-=,.<>/?",
"files": {},
"form": {},
"headers": {
"x-forwarded-proto": "https",
"host": "postman-echo.com",
"content-length": "277",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-type": "text/plain",
"cookie": "sails.sid=s%3ATC0997qJdpy2gmQL6RVvVRXQmyCQy4O5.haigNLcMh0LprmXi6ohGYXkoinbBGyedKAHBJaCeyTo",
"postman-token": "e439e42e-7a17-4021-9144-f47d1fb5a690",
"user-agent": "PostmanRuntime/7.15.0",
"x-forwarded-port": "443"
},
"json": null,
"url": "https://postman-echo.com/post"
}
Response obtained
{ args: {},
data:
{ headers: { 'Content-Type': 'text/plain' },
body:
'Etiam mi lacus, cursus vitae felis et, blandit pellentesque neque. Vestibulum eget nisi a tortor commodo dignissim.\nQuisque ipsum ligula, faucibus a felis a, commodo elementum nisl. Mauris vulputate sapien et tincidunt viverra. Donec vitae velit nec metus.' },
files: {},
form: {},
headers:
{ 'x-forwarded-proto': 'https',
host: 'postman-echo.com',
'content-length': '308',
accept: 'application/json, text/plain, */*',
'content-type': 'application/json;charset=utf-8',
'user-agent': 'axios/0.19.2',
'x-forwarded-port': '443' },
json:
{ headers: { 'Content-Type': 'text/plain' },
body:
'Etiam mi lacus, cursus vitae felis et, blandit pellentesque neque. Vestibulum eget nisi a tortor commodo dignissim.\nQuisque ipsum ligula, faucibus a felis a, commodo elementum nisl. Mauris vulputate sapien et tincidunt viverra. Donec vitae velit nec metus.' },
url: 'https://postman-echo.com/put' }
Describe the bug
While using axios i noticed that axios is giving different response as expected and as obtained in postman app. the data object had some additional parameters. i have added response obtained form both the applications below and also attached the collection and the code snippet i used to run the request.
To Reproduce
run the below code snippet on nodejs and then run the bellow collection in postman app and check the output result
postman collection
Expected behavior
to get response data as shown below
Response obtained
Environment:
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
The text was updated successfully, but these errors were encountered: