I'm developing a client app for android and my API requires me to send picture names in ArrayList<String>
like:
collection[0] = 15a877ce9f22bc8349cac80565c4bff6.jpg
collection[1] = 25a877ce9f22bc8349cac80565c4bff6.jpg
but when i send it it goes in the form like:
collection[] = 15a877ce9f22bc8349cac80565c4bff6.jpg
collection[] = 25a877ce9f22bc8349cac80565c4bff6.jpg
my retrofit interface:
@Field("collection[]") ArrayList<String> collection);
how can I achieve the requested result?
any help would be appreciated! Thank you!
Don't put
[]
in the@Field
name, I don't know exactly why you are doing this but it could be confusing as those are reserved character...You can use something like this: