Questions tagged as 'retrofit'

2
answers

Send camera image to server via Retrofit

I learned to send an image of the drawable folder to my server on the network using lib Retrofit, but I am not able to send a ImageView the camera. I create a class that converts the drawable image to bytes , which it will get from...
asked by 10.11.2015 / 12:42
2
answers

What is Retrofit?

I'm using the retrofit in an application to consume a Java Web Service and I'm in doubt:    Is Retrofit a library or an API?     
asked by 06.12.2017 / 00:25
1
answer

How to get the result of the Request in Retrofit 2.0

Well, I'm starting to study Android, I even made an application with Volley but a friend indicated Retrofit because it was much faster and "simple". But I still can not understand much. I have a WebService where I want to log in. I have to se...
asked by 09.12.2015 / 23:00
1
answer

How to read a local json file using retrofit 2.0?

For API testing purposes, I need to read json files that would be my responses in API requests. Well, with Retrofit 1.9 it was possible to implement a "Client" and override the "execute ()" method to read the json file locally. With Retrof...
asked by 01.12.2015 / 13:44
0
answers

Error: Trust anchor for certification path not found

I have an application Android , using the Retrofit library to handle requests , when trying to make any request on a android 5.0 or lower, I get the following log :    I / call: java.security.cert.CertPa...
asked by 15.03.2017 / 13:41
2
answers

String deserialization

I got Retrofit the Drivers field from the following json: { "Drivers": [ { "DriverID": 0, "Latitude": -23.642276336, "Longitude": -46.634615118 }, { "DriverID": 1, "Latitude": -23.64227916, "Lo...
asked by 22.01.2016 / 16:22
1
answer

retrofit - How to send a JSON via POST

Talk to me, I'm using Retrofit 2 and I'm not able to send JSON to WS. I have my class here that sets json the way I need it: CustomGsonAdapter public class CustomGsonAdapter { public static class UserAdapter implements JsonSerializer&l...
asked by 04.05.2017 / 19:59
1
answer

Ignore attribute in POST using Retrofit

I would like to know how to ignore an attribute of a model in a POST request with Retrofit. In GET requests I want to bring all attributes, but in requests POST I need to send the object without id for example. Sam...
asked by 01.08.2017 / 22:11
2
answers

Retrieve json object

I have the following object: { codigo : "1", nome : "Carlos" } Java class (POJO) public class usuario{ @SerializedName("codigo") private int codigo; @SerializedName("nome") private String nome; /* ... */ } The ca...
asked by 09.08.2017 / 16:20
1
answer

How to make two Retrofit calls in jail with RxJava?

I make a call to retrieve some data and the second call - which should be done within the first - uses one of the fields of the previous call. val restApi = retrofit.create(RestAPI::class.java) testAPI.searchDoc("language", "title_query")...
asked by 12.12.2017 / 00:12