title: Using localhost with Flutter & testing with iOS device
body: <p>I'm trying to figure out how to have an iOS device reach my node server from flutter. Node is listening on port 5000, and as you can see in my request is trying port 5000. Currently, I'm getting back a network error 'Connection refused, errno = 61'. Any idea how to fix it?</p>
  
  <pre><code>var url = 'http://localhost:5000/photo';
  
  try {
    final res = await http.post(
      url,
      body: {'photo': photo, 'dir': destination},
      headers: {"Accept": "*/*", "Connection": "keep-alive"},
    );
    print(res.body);
    if (res.statusCode &gt;= 400) {
      final resBody = json.decode(res.body);
      throw HttpException(resBody['errors'][0]);
    }
  } catch (err) {
    throw (err);
  }
  </code></pre>