title: Node js Request body type is [Object, Object]
body: <p>I want to send a request with a custom string value to the server with express and body-parser in Node.js, but I get the following when I try to inspect the posted value.</p>
  
  <blockquote>
    <p>[object Object]</p>
  </blockquote>
  
  <p>Server -</p>
  
  <pre><code>var express = require('express')
  var bodyParser = require('body-parser')
  var app = express()
  app.use(bodyParser.urlencoded({ extended: true }))
  app.post('/', callback)
  
  function callback(req, res) {
    console.log('post/' + req.body)
    res.send('post success!')
  }
  </code></pre>
  
  <p>Client -</p>
  
  <pre><code>var request = require('request')
  request.post({
    url: 'http://127.0.0.1:8000/',
    body: 'testing'
  }, function optionalCallback (err, httpResponse, body) {
    if (err) {
      return console.error('upload failed:', err)
    }
    console.log('Upload successful!  Server responded with:', body)
  })
  </code></pre>
  
  <hr>
  
  <p>Client logs -</p>
  
  <blockquote>
    <p>Upload successful!  Server responded with: post success!</p>
  </blockquote>
  
  <p>Server logs -</p>
  
  <blockquote>
    <p>post/[object Object]</p>
  </blockquote>
  
  <p>how can I get the string content <code>"testing"</code> instead?
  Thank you!</p>