Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client #5

Open
farahnahwa opened this issue Feb 2, 2020 · 0 comments

Comments

@farahnahwa
Copy link

farahnahwa commented Feb 2, 2020

request.post({
url: url,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': "Basic " + base64.encode("SB-Mid-server-w5e5xXjxtHL7ecHJ48qcnEhT:")
},
body: JSON.stringify(reqBody)
}, function(err, response, body) {
if(err) {
console.log(err);
console.log("error bos")
} else {
var respObj = parseJson(body);
console.log(body);

}

});

how it solve please
while the response was successful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant