title: How can I make nock respond with an 'undefined' body?
body: <p>I'm testing a request handler that deals with different situations and one of them expects a response with HTTP code 204 and no response body (<code>typeof response.body === 'undefined'</code>).</p>
  <p>I tried to set the reply to <code>null</code>, <code>undefined</code> and not setting it at all. In all these cases, the response body is an empty string (<code>''</code>).</p>
  <p>Is there a way to delete the response body from Nock?</p>
  <p>This is the test I'm trying to run:</p>
  <pre class="lang-js prettyprint-override"><code>it('should return true if body is undefined (usually, 204 status responses - No content)', async () =&gt; {
    nock('http://test.com')
      .put('/')
      .reply(204, undefined)
  //  .reply(204, null) also fails
  //  .reply(204) also fails
  
   const result = await Request._request('http://test.com', { method: 'PUT' })
  
   expect(result).to.be.true
  })
  </code></pre>
  <p>And this is the code I'm trying to test:</p>
  <pre class="lang-js prettyprint-override"><code>static async _request (url, options) {
      return new Promise((resolve, reject) =&gt; {
        request(url, options)
          .then((response) =&gt; {
            if (response.statusCode &lt; 300) {
              if (typeof response.body === 'undefined') {
                resolve(true)
              } else if (isJSON(response.body)) {
                resolve(JSON.parse(response.body.replace(/\s/g, ' ')))
              } else {
                .
                .
                .
  </code></pre>