1. Are you ready for the Galaxy S20? Here is everything we know so far!

HTTP vs localhost

Discussion in 'Android Development' started by 23tony, May 4, 2019.

  1. 23tony

    23tony Well-Known Member
    Thread Starter

    I just learned that you can't use localhost on the emulator, since it's actually a separate device (so localhost from the emulator is the emulator). I found a suggestion to use 10.0.2.2:8080, but that didn't do any good, and I couldn't find much more.

    So I'm wondering, how do you do HTTP requests against your dev system?
     


  2. Deleted User

    Deleted User Guest

    GameTheory likes this.
  3. 23tony

    23tony Well-Known Member
    Thread Starter

    DOH, didn't even think to try NOT specifying the port. Thank you!
     
  4. Deleted User

    Deleted User Guest

    Well 8080 is the default port used by Tomcat. If it's not listening on the host dev system, you'll never get a reply ;)
     
    GameTheory likes this.
Loading...

Share This Page

Loading...