title: My POST request is failing with a 'Request with GET/HEAD method cannot have body' error
body: <p>I am trying to use Zoho Creator's ADD RECORDS DATA API (<a href="https://www.zoho.com/creator/help/api/v2/add-records.html" rel="nofollow noreferrer">https://www.zoho.com/creator/help/api/v2/add-records.html</a>)</p>
  <p>And here's the URL to help you understand my issue. The URL below will show you a JSON of all the variables involved before I run the POST method.</p>
  <p><a href="https://vp-expo-node-server.herokuapp.com/eticket/" rel="nofollow noreferrer">https://vp-expo-node-server.herokuapp.com/eticket/</a></p>
  <p>This above link will show you the result of this controller</p>
  <pre><code>
  exports.addOneExhibitorToCreator = async function(req, res, next) {
    try {
      const token = await getAccessToken();
      const url = process.env.ZOHO_CREATOR_FORM_URL + &quot;/Add_Organisation&quot;;
      // const organisation = req.body;
      const organisation = {
        data: {
          isActive: true,
          Organisation_Name: &quot;Test With Alim&quot;,
          Type: &quot;Exhibitor&quot;,
          Short_Name: &quot;test&quot;,
          Email: &quot;test@fourplusmedia.com&quot;,
        },
      };
  
      const options = {
        Method: &quot;POST&quot;,
        Headers: {
          &quot;Content-Type&quot;: &quot;application/json&quot;,
          Authorization: &quot;Zoho-oauthtoken &quot; + token,
        },
        body: JSON.stringify(organisation),
      };
  
      const functionForResponse = &quot;const response = await fetch(url, options);&quot;;
  
      // const response = await fetch(url, options);
      // const data = await response.json();
  
      res.status(200).json({
        status: &quot;success&quot;,
        token,
        options,
        url,
        organisation,
        functionForResponse,
      });
    } catch (err) {
      console.log(err);
      res.status(500).json({
        err,
      });
    }
  };
  
  
  </code></pre>
  <p>When I uncomment these 2 lines in the above controller</p>
  <pre><code>    const response = await fetch(url, options);
      const data = await response.json();
  
  </code></pre>
  <p>I get this result</p>
  <p><a href="https://vp-expo-node-server.herokuapp.com/eticket/response" rel="nofollow noreferrer">https://vp-expo-node-server.herokuapp.com/eticket/response</a></p>
  <p>As I don't know how to display the error on the browser I tried to console.log it and I got this error in the console</p>
  <pre><code>TypeError: Request with GET/HEAD method cannot have body
      at new Request (/Applications/MAMP/htdocs/vp-expo-node-server/node_modules/node-fetch/lib/index.js:1199:10)
      at /Applications/MAMP/htdocs/vp-expo-node-server/node_modules/node-fetch/lib/index.js:1409:19
      at new Promise (&lt;anonymous&gt;)
      at fetch (/Applications/MAMP/htdocs/vp-expo-node-server/node_modules/node-fetch/lib/index.js:1407:9)
      at exports.addOneExhibitorToCreatorResponse (/Applications/MAMP/htdocs/vp-expo-node-server/controllers/eticketController.js:82:28)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
  
  </code></pre>
  <p>And I can confirm that the this line in the console.log</p>
  <pre><code>    at exports.addOneExhibitorToCreatorResponse (/Applications/MAMP/htdocs/vp-expo-node-server/controllers/eticketController.js:82:28)
  </code></pre>
  <p>points to the uncommented lines...</p>
  <p>So there's something wrong I am doing in those 2 lines.. but according to me it's the right way to send a POST request.. and I have no clue how a POST request can get a  <code>Request with GET/HEAD method cannot have body</code> error.</p>
  <p>Any help would be appreciated. I've double checked it and I've even asked Zoho for help (they mentioned as it's a client side thing they couldn't do much to help)</p>