I need to connect to a device directly to get data...
# ktor
l
I need to connect to a device directly to get data from a REST API it hosts. I’m using ktor client for this. When I am only connected to the device via wifi, I can use a base url of 10.0.0.1 and everything works fine, but when I turn on LTE, ktor gets a 404 on all the calls. I think this is because the device doesn’t provide internet, so ktor favors LTE, which does. Is there a way to configure a ktor client to ignore LTE and only communicate via wifi?
a
I don't think you can solve this on the HTTP client's level (is it possible to do this with any other HTTP client?). Did you try port forwarding?
l
This needs to be set up in a production app. I don't know that port forwarding is possible in a production app. I may have to look into the network configuration on Android. I need to verify if I see the same on iOS devices.