D
D
d1zz72021-09-19 12:34:19
React Native
d1zz7, 2021-09-19 12:34:19

How to send POST from phone?

I start the local server localhost:5555, then I start expo and from the physical phone through Expo Go I launch the application in which a post request should be sent to the local server localhost:5555. But something doesn't work :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MinusD, 2021-09-20
@d1zz7

localhost does not work on the local network, but only on one computer, you can use it with the emulator. If you want to test from a physical phone, you need to contact by ip

When I throw on IP 198.168.8.100 -> 404, but I'm sure that everything is correct, I just throw it in the wrong place.
when on localhost then network error
Try specifying a port here.
Plus a small addition, not all programs work with localhost, some need 127.0.0.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question