Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No suitable URL request handler found?

I'm trying to connect to server on another computer in my network, I'm trying to send and check login data (username and password) with fetch to get json OK response. However, simulator is giving me error:

enter image description here

The code is this:

  LogIn() {
fetch('192.168.5.13:8087/login', {
  method: 'post',
  body: JSON.stringify({
    config_name: 'default',
    username: this.state.username,
    password: this.state.password,
  })
})

I've been searching for a solution for a better part of the day, any ideas?

like image 264
Romy Avatar asked Jun 29 '16 12:06

Romy


1 Answers

Assuming you've already tested the connection to your service through other means to confirm it's reachable via that address/port, you just need to add the correct protocol. Changing it to this (assuming it's not https) should do the trick.

http://192.168.5.13:8087/login

like image 135
Brice Mason Avatar answered Sep 20 '22 11:09

Brice Mason