How to add multiple of the same/array parameter using Retrofit?

前端 未结 2 1544
一向
一向 2021-02-20 01:14

I have an instance where I need to pass multiple of the same named parameters to a server (array of data).

Changing it is not a possibility.

http://test         


        
2条回答
  •  臣服心动
    2021-02-20 02:13

    I am using retrofit:1.9.0, one way of doing http://test.com?test[]=1&test[]=2&test[]=3 is like this

    void test(@Query("test[]") ArrayList values);
    

提交回复
热议问题