title: node-fetch send post body as form-data
body: <p>I am trying to send a POST request with body as <code>form-data</code> since this seems to be the only way that works.</p>
  <p>I tried this in Postman too and sending <code>body</code> as <code>raw JSON</code> didn't work.</p>
  <p>So I tried doing the same with <code>node-fetch</code> but seems like <code>body</code> is being sent as <code>JSON</code> and I'm getting the same error as before (when using <code>raw</code> from Postman).</p>
  <pre><code>try{
    const { streamId } = request.body;
    const headers = {        
      &quot;Authorization&quot;: INO_AUTHORIZATION_CODE,
      // &quot;Content-Type&quot;: &quot;multipart/form-data; boundary=&lt;calculated when request is sent&gt;&quot;
      &quot;Content-Type&quot;: &quot;application/json&quot;
    }      
    const url = `https://www.inoreader.com/reader/api/0/stream/contents/${streamId}`;
    const body = {
        AppId: INO_APP_ID,
        AppKey: INO_APP_KEY
    }
    
    const resp = await fetch(url, {
        method: 'POST',
        body: JSON.stringify(body),
      //   body: body,
        headers: headers
      });   
      
    const json = await resp.text();
    return response.send(json);
  } catch(error) {
      next(error);
  }
  </code></pre>
  <p>Only setting body as <code>form-data</code> works:</p>
  <p><a href="https://i.stack.imgur.com/FE6zD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FE6zD.png" alt="enter image description here" /></a></p>