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

前端 未结 2 1550
一向
一向 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 01:59

    Retrofit as of 1.4.0 added the ability to send an array or List as a @Field or @Query parameter.

    New: @Query and @EncodedQuery now accept List or arrays for multiple values.
    New: @Field now accepts List or arrays for multiple values.
    

提交回复
热议问题