mie stampe api un semplice oggetto JSON come questo:get semplice oggetto JSON utilizzando retrofit 2
{"status":1}
Come dire che retrofit (v2) passarlo a GSON e restituire un JSONObject contiene questa coppia chiave-valore in risposta?
ho cercato seguente:
Call<JSONObject> result();
Ma quando le stampe response.body()
in onResponse (Response<JSONObject> response)
metodo, restituisce {}
che significa che è vuoto.
Hai provato ad accedere a 'response.raw(). Body()'? –
hai trovato la soluzione? – WonderKid