I am trying to do the same request from nodejs. The python code is
import requests
r = requests.post(url,
data=data,
headers={
'User-Agent': self.ua,
'Content-Type': 'application/x-www-form-urlencoded'
}
)
and in node I tried node-fetch and Axios and request but not getting the same response, I also tried CURL from bash but getting the same response of node, I tried to print python headers print(r.request.headers) and copy paste it in node but getting different response
Axios.post(url, {
data,
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36",
"Content-Type": "application/x-www-form-urlencoded",
}
})
.then(text => console.log(text.data))
.catch(err => {
console.log(err);
});
I am getting different result in python I get what I expect but in node I am getting html response
Sorry, could not complete request because: <div class="tk-intro" style="font-size: 14px;color:#ff090f;">application information was not supplied.</div>
but in python works fine