title: Unexpected token in JSON for special characters
body: <p>Why am I getting <code>SyntaxError: Unexpected token &lt; in JSON at position 0</code> when trying to send a <code>post</code> request that contains characters in <code>body</code> like <code>–</code> or <code>’</code> ?</p>
  
  <p>This is how I'm sending the request (I've added the hard coded body just as an example):</p>
  
  <pre><code>import request from 'request';
  
  export default {
    postScriptRequest(body) {
      return new Promise((resolve, reject) =&gt; {
        const options = {
          'method': 'post',
          'body': JSON.stringify({
            "text": "Sending – instead of - and ’ instead of ' returns Unexpected token in JSON"
          }),
          'headers': {
            'Content-Length': JSON.stringify(body).length
          },
          'url': 'my-url.com'
        }
        request(options, (error, response, body) =&gt; {
          if(response.statusCode == 200) {
            resolve(body);
          }
          else {
            reject(response.statusCode);
          }
        });
      });
    }
  }
  </code></pre>