Open otymartin opened 7 years ago
Your phone (and likely simulator) isn't going to be able to access your localhost. You need to create a publicly accessible URL to use. The easiest way to do this for a local development machine is to use ngrok. Once you've installed ngrok, run it like so:
$ ngrok http 1337
This will give you a public URL like https://abcdef123.ngrok.io
. Modify the code to use that URL:
let tokenRequestUrl = "https://abcdef123.ngrok.io/token"
That should get you going. Sorry for not seeing this earlier.
@joliveros @brentschooley @mcelicalderon No matter what, I can't get my URL to hit my server endpoint. My server is working properly (nodejs), I tested this by sending a regular get request to my http://localhost/token which works. The problems occurs when I attempt to send a POST request with parameters. Perhaps a swift 3 example to show how its done? The method found in the code example doesnt work either.