title: NodeJs post request on a api accents error
body: <p>I have a problem when I post a json with accents (like éè...) the server send back a 400 bad request error. I don't know how to solve this problem.</p>
  
  <pre><code>bodyStr ='{"name":"ééé"}';
  //headers
  var headers = {
      'Content-Type': 'application/json',
      'Content-Length': bodyStr.length,
      'X-Key' : this.xkey
  };
  
  //http request
  request({
      uri : this.httpHost + path, 
      method: method, 
      headers : headers, 
      body : bodyStr
  },  
  function (error, response, body) {
      if (!error &amp;&amp; response.statusCode &lt; 400) {
          if (typeof successCallback == "function") {
              successCallback(JSON.parse(body), response);
          }
      } else {
          if (typeof errorCallback == "function") {
              errorCallback(error || response.body || response.statusCode, response);
          }
      }
  }
  );
  </code></pre>