retrofit2 Questions

10

Solved

I need to send next json via retrofit 2: { "Inspection": { "UUID": "name", "ModifiedTime": "2016-03-09T01:13", "CreatedTime": "2016-03-09T01:13", "ReviewedWith": "name2", "Type": 1, "Projec...
Counterspy asked 9/3, 2016 at 0:46

4

Solved

I am using Retrofit 2.1.0 for API parsing in my android application. I need the time taken by retrofit to parse the API. How to obtain the Request/ response time using Retrofit 2. Below is the R...
Roughneck asked 10/8, 2016 at 12:21

4

Solved

I am using two kind of interceptor, one is HttpLoggingInterceptor and another one is my custom AuthorizationInterceptor I am using below updated retrofit version library, def retrofit_version = "...
Iodize asked 13/3, 2020 at 13:33

2

@Headers("key : aW5kaWhvbWU", "Content-Type : application/json") @GET("product_cat/5") fun getProduct( ): Call<ResponseListProduct> val interceptor = HttpLoggingInterceptor().setLevel(HttpLo...
Alexandro asked 16/6, 2020 at 17:50

5

I am using Retrofit in my app. Everything is working fine but when I create the release version of the app some calls aren't working. What could the problem be? I already disabled minifyEnabled in...
Pastorale asked 18/4, 2018 at 12:8

4

Solved

I'm going to send a simple get method to my server(it is Rails app) and get the result using RxJava and Retrofit. The thing that I did is: My interface: public interface ApiCall { String SERVICE...
Imp asked 16/4, 2017 at 5:34

3

Solved

I can't send json array to server. When I test in postman raw, it is ok, success return. Postman Raw; [ { "product_id": 2, "name": "Umbrella", "price": 200, "quantity": 1, "totalprice": 20...
Makassar asked 11/7, 2019 at 5:2

3

Solved

I'm using kotlinx.serialization in conjunction with retrofit. The json response that I receive will vary in terms of what attributes it will contain. In most cases, the data model in my app has mor...
Calypso asked 11/10, 2019 at 2:9

5

I'm trying to use retrofit in my spring boot project to access a https call, but every time I run it, it gives java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Socke...
Mireielle asked 22/12, 2016 at 16:4

3

Solved

I have a simple enum: public enum Season { @SerializedName("0") AUTUMN, @SerializedName("1") SPRING; } Starting some version, GSON became able to parse such enums. To make sure, I did this: ...
Hampstead asked 4/3, 2016 at 10:14

5

Solved

When using Retrofit, I know you can use @FieldMap Map<String, String> options to specify optional queries. Say that I have a api call that had 2 required fields and 3 optional fields. How ...
Cypress asked 3/5, 2016 at 23:55

1

Solved

Server accepts all parameters except boolean one with Multipart form request data So I have such request: @Multipart @POST("auth/...") suspend fun sendExampleRequest( @Part("enabled...
Feuar asked 30/3, 2023 at 17:12

6

Solved

I am using retrofit and I have a post request interface NetworkApi { @Headers("Content-Type: application/json") @POST("/") fun startLoginRequest(@Body loginModel : LoginModel) : Call<BaseResp...
Enchanting asked 16/11, 2016 at 17:11

6

Solved

I am using kotlin coroutines for network request using extension method to call class in retrofit like this public suspend fun <T : Any> Call<T>.await(): T { return suspendCancellabl...
Ibanez asked 22/10, 2017 at 8:58

5

Solved

I am using Retrofit to upload images to my server. Here I need to upload multiple images for a single key. I have tried with Postman web client it is working well. Here is a screenshot. Here are...
Langobard asked 5/10, 2016 at 6:17

1

I am having a lot of UnknownHostException thrown and the app is disconnected from the internet completely, this issue is happening in multiple apps I am working on the issue happens on Samsung and ...
Packard asked 19/9, 2022 at 14:8

8

Solved

Recently I started using Retrofit 2 and I faced an issue with parsing empty response body. I have a server which responds only with http code without any content inside the response body. How can ...
Liverish asked 20/10, 2015 at 4:39

5

Solved

Hello everyone I want to post image and other data through Retrofit2. I am sending data with one image. All the other info is storing but my image is not storing.while i am testing with postman...
Gallopade asked 28/9, 2018 at 10:19

4

Solved

i'm trying to call an api in my application i've the following url template test-test.domainname.com/feeds/json/v3/attribute/attribute i'm using retrofit 2 but i get the following fatal exc...
Bunchy asked 31/1, 2016 at 13:39

7

Solved

I need to add cookies with retrofit 2.0. If i understand correct, cookies - the same as headers. this cookies must be added: private HashMap<String, String> cookies = new HashMap(); cookies....
Tilburg asked 17/7, 2016 at 7:15

5

Solved

I'm using retrofit for my network layer I'm facing a strange issue I've the parameter and it's value look like this store://0TxIGQMQbObzvU4Apia0V0&callback= and after encoding it changes ...
Amadeus asked 25/2, 2017 at 21:5

3

Solved

I am not developing a Android Application , I'm just writing some JAVA codes to support Imgur API services. public interface ImgurAPI { String server = "https://api.imgur.com"; String BASE6...
Nuno asked 30/3, 2017 at 7:43

7

Solved

I called PATCH web service using Retrofit2 but onResponse is not called and the onFailure is called Despite of the operation of the service is succeeded on the server side perfectly And whenever,...
Suggs asked 2/3, 2016 at 10:39

1

Sometimes I get this SctrictMode Exception: 2019-01-28 14:18:23.073 4597-4615/my.app.package E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable...
Mosher asked 30/1, 2019 at 11:27

4

Solved

I am trying to add basic authentication (username and password) to a Retrofit OkHttp client. This is the code I have so far: private static Retrofit createMMSATService(String baseUrl, String user,...
Necrology asked 12/4, 2017 at 9:51

© 2022 - 2025 — McMap. All rights reserved.