Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Problem while posting base64 along with a REST API request - React Native

$
0
0

I would like to post a picture that is encoded in base64 along with a REST API

const data = {        UserId:this.state.user.id,        PictureUri:avatar    };    const res = await fetch(        url,        {            method: "POST",            headers: {"Accept": "application/json","Content-Type": "application/json"            },            body: JSON.stringify(data)        }    )

The problem that I have encountered is that this POST (HTTPS) request doesn't work when I am using the cellular data of the iPhone whereas it works when I am on WiFi or a Mobile Hotspot. In such a case, the server (in DMZ) does not receive any request.

What can block this communication?


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>