The call to okhttp3 execute() runs on the current thread, which can result in Android throwing an exception (network call on the main thread). You will either call enqueue() and have the client pass you a callback (thus changing your external API), or, document that connect.call() needs to be run on a background thread.
The call to okhttp3
execute()
runs on the current thread, which can result in Android throwing an exception (network call on the main thread). You will either callenqueue()
and have the client pass you a callback (thus changing your external API), or, document thatconnect.call()
needs to be run on a background thread.