Questions tagged as 'retrofit'

0
answers

Does not access the OnResponse () method retrofit android

I am making a call from a post method that returns me an id generated through retrofit 2, however, in return, it never accesses the onResponse method, I already tried to use other objects and formats, but none worked. Below the service return:...
asked by 04.08.2017 / 19:52
0
answers

Android Retrofit 2 Simple XML Converter Response

I'm using Retrofit 2.2.0 and Retrofit SimpleXML Converter 2.2.0. I added the simplexmlconverter to the retrofit instance with the addConverterFactory method. The problem is that when I get the response from the server, the following error occ...
asked by 17.04.2017 / 21:16
1
answer

Mounting url for test in cUrl

I'm using Retrofit to call an internal API from a site I'm testing. A url similar to the one I have is: www.sitedeteste.com/r/ In my Android retrofit I have this PUT statement: @PUT("/ordem/{Id}/{tipo}") In my Ubuntu terminal my u...
asked by 28.03.2017 / 02:04
0
answers

Error: Content-Length and stream length disagree

If you use a Log this way rescuing the body from response : Log.wtf(TAG,""+response.body().string()); Correctly prints the JSON value. Something in this format: {"error":true,"message":"Login failed. Incorrect credentials"} Bu...
asked by 20.04.2017 / 23:48
1
answer

Retrofit, response body always null but on server is status 200

I am implementing an Android application using Retrofit 2, the service is generic the server side is working. The problem is: The response.body () is always null, I can never get json, even though I can print it with OKHTTP. How to solve t...
asked by 20.11.2016 / 12:13
0
answers

Post request with retrofit + android [closed]

I'm studying android, and I'm trying to use the retrofit library with android. After reading the documentation and seeing several examples in answers here in stackoverflow I was able to send data from a form via POST to a page written in...
asked by 26.09.2016 / 22:17
2
answers

Error closing ProgressDialog

public UserRest login(Usuario usuario, final Context context){ try { showProgress(context, "Aguarde", "Validando usuário..."); UserService service = ServiceGenerator.createService(UserService.class); Call<UserRe...
asked by 16.06.2016 / 13:31
1
answer

How do I know when a call of the retrofit is finished in order to start an activity?

I have two calls (Call) of Retrofit 2, one that downloads a object of type Config, and one that downloads a list of objects of type Registrations. I need to know when these two calls are finished, so I can call a new activity , however,...
asked by 13.01.2016 / 01:14
1
answer

Error with retrofit

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $ public interface RestApi { @GET("/posts") Call<Model[]> getWheatherReport(); } public class Mai...
asked by 29.07.2016 / 18:15
1
answer

Retrofit: Could not locate ResponseBody converter for

I'm working on a system and I need Retrofit2 (with Spring Boot) but I'm not getting it. The source and error follow. @JsonIgnoreProperties({"codibge", "codestado"}) public class CEP { private String cep; private String logradouro; priva...
asked by 16.04.2018 / 04:05