Обработка нулевого ответа от сервера в залпе ⇐ Android
-
Anonymous
Обработка нулевого ответа от сервера в залпе
I am calling a web API with POST data from volley that returns a 400 code if there's a problem with the data, else a 200. In both cases, the response body is null. However, volley is treating the 200 case as an error. I don't see any response headers at all as error.networkResponse is null.
Is there any setting to make it not throw an exception for null responses? i.e., go to onResponse instead of onErrorResponse
Источник: https://stackoverflow.com/questions/780 ... -in-volley
I am calling a web API with POST data from volley that returns a 400 code if there's a problem with the data, else a 200. In both cases, the response body is null. However, volley is treating the 200 case as an error. I don't see any response headers at all as error.networkResponse is null.
Is there any setting to make it not throw an exception for null responses? i.e., go to onResponse instead of onErrorResponse
Источник: https://stackoverflow.com/questions/780 ... -in-volley
Мобильная версия