Lukas S
Lukas S

Reputation: 335

Are Google Volley HTTP requests synchronous or asynchronous?

so i had a interesting conversation today about Volley being synchronous. So i want to ask you if the Volley HTTP-requests synchronous or asynchronous. It's about the HTTP-Requests, not the fact being an AsyncTask.

Upvotes: 0

Views: 429

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006869

From the standpoint of the code telling Volley to make a request, the API is asynchronous. You provide a callback, and you get the results or error asynchronously via that callback.

Other HTTP client APIs, like OkHttp, offer either synchronous or asynchronous operation.

Upvotes: 2

Related Questions