title: how send file and json, in react native using fetch
body: <p><strong>I need to send a request to the server from ReactNative js to this result was how do I do?</strong></p>
  
  <pre><code>Parameters: {"user"=&gt;{"username"=&gt;"test", "email"=&gt;"test@test.test", "password"=&gt;"[FILTERED]", "repeat_password"=&gt;"[FILTERED]", "telephone"=&gt;"123456789", "location"=&gt;"bla bla blalaldlval", "avatar"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x007f76fd47b910 @tempfile=#&lt;Tempfile:/tmp/RackMultipart20170503-4-k6vif.jpg&gt;, @original_filename="01858.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[avatar]\"; filename=\"01858.jpg\"\r\nContent-Type: image/jpeg\r\n"&gt;}}
  </code></pre>
  
  <p><strong>i try so</strong></p>
  
  <pre><code>static async createUser(paramsUser) {
    let response = await fetch('http://test.herokuapp.com/users', {
      method: 'POST',
      headers: {
       'Accept': 'application/json',
      'Content-Type': 'application/json'
      },
      body: JSON.stringify({
       user: {
        username: paramsUser.username,
        email: paramsUser.email,
        password: paramsUser.password,
        telephone: paramsUser.telephone,
        location: paramsUser.location,
        avatar: paramsUser.avatar, // this is image
       }
      })
    });
    return response = JSON.parse(await response.text())
  }
  </code></pre>
  
  <p><strong>but his only json and how send for file?</strong></p>