RapidSoftwareSolutions / rapidapi-android-sdk

Find, try and connect to APIs easily with the RapidAPI marketplace
http://rapidapi.com
2 stars 4 forks source link

connect.call() can throw exceptions #2

Open psh opened 7 years ago

psh commented 7 years ago

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.