title: How to post multipart in react native with RNFetchBlob or any other way
body: <p>i'm trying to send multipart request in react native. I tried many ways but none of them worked. Please check this example.</p>
  
  <pre><code>const data ={
          "person": this.state.person,
          "email": this.state.email,
          "password":this.state.password,
          "confirmPassword":this.state.confirmPassword,
          "otp": {
              "secret":this.state.otp
          },
      }
  
  
  
    RNFetchBlob.fetch('POST', '${server}api/user-registration/register', {
          'Content-Type' : 'multipart/form-data',
      }, [
          {
              name:"data",data:JSON.stringify(data)
          }
      ]).then((resp) =&gt; {
         console.log(resp)
      }).catch((err) =&gt; {
         console.log(err)
      })
  </code></pre>
  
  <p>I'm getting 415 as response. Looks like it's not put multipart/form-data in the Headers.</p>
  
  <p>I've already tried that with Reactjs and it's totally working.
  This is an example in Reactjs.</p>
  
  <pre><code>  const eventData = new FormData();
  eventData.append('data', new Blob([JSON.stringify(data)], { type: "application/json" }));
  
  axios.post('${server}api/user-registration/register',eventData,{headers:{}})
  </code></pre>
  
  <p>Can anybody see any issue on RNFetchBlob code?</p>