Query param with comma produce multiple query params
Hi,
Client:
import java.net.URI;
import java.util.Map;
import feign.HeaderMap;
import feign.RequestLine;
import feign.Response;
public interface GenericFeignApi {
@RequestLine("GET")
Response get(URI uri, @HeaderMap Map<String, Object> headers);
}
Open feign 11.1 produces ?param=first¶m=second¶m=third
expected: ?param=first,second,third
#924 #922 - These issues are similar and got fixed by https://github.com/OpenFeign/feign/pull/930 but I am still experiencing it in OpenFeign 11.1
P.S. Currently I am able to get it work by url-encoding 'comma' in the query param before providing it to Feign as proposed in #924 #922
Thanks.
As far as I guess there should be QueryMap instead of HeaderMap.
Is it correct?
@radio-rogal Am using an HeaderMap to pass the headers.
scheme://host:port/path?query are all part of the java.net.URI uri
This is intentional. If you want different collection format, you'll need to specify that you want comma delimited. See CollectionFormat and update the RequestLine annotation and use CSV. That should produce what you are looking for.