FG
๐Ÿ”Œ APIs & SDKs

Error response data nodejs

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score77%
77%

Problem

Describe the bug ` var axios = require('axios'); var data = JSON.stringify({ "production_status": "", "package_status": [], "extra_status_reason": [], "page": 1, "limit": 1 }); var config = { method: 'post', url: 'https://example.com/', headers: { 'Authorization': 'Bearer token', }, data: { "production_status": "", "package_status": [], "extra_status_reason": [], "page": 1, "limit": 1 } }; axios(config) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.log(error); }); ` When i send API this response I want respose must be json like that To Reproduce _No response_ Code snippet _No response_ Expected behavior _No response_ Axios Version 1.2.0 Adapter Version _No response_ Browser _No response_ Browser Version _No response_ Node.js Version 14.20.1 OS _No response_ Additional Library Versions _No response_ Additional context/Screenshots _No response_

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence90% success rate8 verificationsLast verified Mar 14, 2026

Solution: Error response data nodejs

Low Risk

Indeed, that workaround works in my case... based upon https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding I select `identity`: [code block]

76

Trust Score

8 verifications

90% success
  1. 1

    Indeed, that workaround works in my case... based upon https://developer.mozilla

    Indeed, that workaround works in my case... based upon https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding I select `identity`:

Validation

Resolved in axios/axios GitHub issue #5298. Community reactions: 46 upvotes.

Verification Summary

Worked: 8
Partial: 1
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

axioshttpapi