Sign in
Log inSign up

400 bad request : Your browser sent an invalid request

karthik's photo
karthik
·Jun 6, 2016

If I try to post to same url on "Postman", I am able to get response. But inside my express framework I am getting this error as response :

request({
  headers: {

       'Content-Type'  : "application/json" ,
      'Authorization'  : "*****",
      'X-APP-TOKEN'    :  "*****"
  },
  url:"url to hit", 
  method : 'POST',  
}, function(error, response, body){
      if(error) {
          console.log(error);
      } else {
          console.log(response);
          console.log(response.statusCode, body);
      }
});
Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct