title: Can't connect to localhost in React Native WebView
body: <p>I started up a simple http server (<a href="https://rosettacode.org/wiki/Hello_world/Web_server#Python" rel="nofollow noreferrer">from here</a>):</p>
  
  <pre><code>from wsgiref.simple_server import make_server
  
  def app(environ, start_response):
      start_response('200 OK', [('Content-Type','text/html')])
      yield b"&lt;h1&gt;Goodbye, World!&lt;/h1&gt;"
  
  server = make_server('127.0.0.1', 8080, app)
  server.serve_forever()
  </code></pre>
  
  <p>Ran it using:</p>
  
  <pre><code>python3 simple_serve.py
  </code></pre>
  
  <p>Redirecting to <code>http://127.0.0.1:8080/</code> displays "Goodbye, World!".</p>
  
  <p>I then created a new React Native Project and changed <code>index.android.js</code> to:</p>
  
  <pre><code>import React, { Component } from 'react';
  import {
    AppRegistry,
    WebView,
  } from 'react-native';
  
  export default class WebTest extends Component {
    render() {
      return (
        &lt;WebView
          source= {{ uri: "http://127.0.0.1:8080/" }}
        /&gt;
      );
    }
  }
  
  AppRegistry.registerComponent('WebTest', () =&gt; WebTest);
  </code></pre>
  
  <p>"Goodbye, World!" doesn't show up, and I get a warning that says:</p>
  
  <blockquote>
    <p>Encountered an error loading page
    <code>{"canGoForward"false,"code":-6,"canGoBack":false,"description":"net::ERR_CONNECTION_REFUSED","loading":false,"title":"","url":"http://127.0.0.1:8080/","target":5}</code></p>
  </blockquote>
  
  <p>For reference, changing <code>http://127.0.0.1:8080/</code> to <code>https://www.google.com</code> works.</p>