androidkotlingetfuel

Sending HTTP GET request using FUEL, nothing comes thru


I'm trying to send a simple GET request using FUEL to my webserver, when I try to debug, I can see what happens when I click the button in the app, then I get this output:

I/DpmTcmClient: RegisterTcmMonitor from: $Proxy1
I/System.out: --> GET http://1.1.1.1/post.php
    Body : (empty)
    Headers : (0)
I/System.out: <-- -1 http://1.1.1.1/post.php
    Response : 
    Length : 0
I/System.out: Body : (empty)
    Headers : (0)

I've changed the IP to a random open one, using my real IP in the script. This is my script (which is taken from github)

uttonClickMe.setOnClickListener{
              Fuel.get("http://1.1.1.1/post.php")
                  .response { request, response, result ->
                    println(request)
                    println(response)
                    val (bytes, error) = result
                    if (bytes != null) {
                        println("[response bytes] ${String(bytes)}")
                    }
                }
        }

However I see nothing on my servers end in the logs about requests coming thru, can someone point me in the right direction?


Solution

  • I figured it out, even thru I tried with and without ssl, it was with an invalid ssl cert, it is now working with domain and valid ssl.