title: How to test Express/node REST API backend with Advanced REST Client or Postman?
body: <p>I need to test my REST API backend that accepts JSON with the Advanced REST Client or Postman for Chrome. </p>
  
  <p>But I am running into issues: I can only send the request using the built-in form and using Content-Type: application/x-www-form-urlencoded</p>
  
  <p>But this will not work since I have embedded documennts, for example, <strong>I need to POST this</strong>: </p>
  
  <pre><code>{title:"Awesome post!", tags: ["blue", "jeans"] }
  </code></pre>
  
  <p>This is not possible with the built-in forms of either Chrome extension.</p>
  
  <p>When I select Raw Body and insert the content there, my backend sees the req.body as being an empty object. When I also set the header "Content-Type: application/json", I get the following error in my backend:</p>
  
  <pre><code>SyntaxError: Unexpected token n
  at Object.parse (native)
  at IncomingMessage.exports.parse.application/json (/Library/WebServer/Documents/slipfeed/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:135:16)
  at IncomingMessage.EventEmitter.emit (events.js:85:17)
  at IncomingMessage._emitEnd (http.js:366:10)
  at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
  at Socket.socket.ondata (http.js:1682:22)
  at TCP.onread (net.js:404:27)
  </code></pre>
  
  <p>Note: I am using bodyParser() and methodOverride() in my app's configuration. Disableing them did not help.</p>
  
  <p><strong>What settings should I use so that I could just enter the JSON to the Raw body field and the request would work?</strong></p>
  
  <p>To clarify the answer: I had to set both Content-Type: application/json (in request header) and use well-formed json where property names are also inside double quotes to get it working.</p>