title: When making POST request with Nodejs, how to get content length of request payload?
body: <p>I'm making a http request to remote API using Nodejs, using the request library.</p>
  
  <p>The request payload is a plain old JavaScript object.</p>
  
  <p>I need to set content-length header on the request, but I'm not sure how to get this value?</p>
  
  <p>Previously I have used Buffer.byteLenth(requestPayload), but does not work with objects.</p>