cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6941) Send Comma Separated Array in url request
Date Mon, 27 Jun 2016 11:50:52 GMT

    [ https://issues.apache.org/jira/browse/CXF-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350858#comment-15350858
] 

Sergey Beryozkin commented on CXF-6941:
---------------------------------------

Hi Neal

thanks, the most important thing here is that most WEB clients will all support "a=1&a=2&a=3"
and  most server frameworks will handle it correctly. It appears to be the most portable option.
 
Lets keep this issue open for a while though in case you see some difficulties with the migration.
Ping me off line if you'd like too,    

> Send Comma Separated Array in url request
> -----------------------------------------
>
>                 Key: CXF-6941
>                 URL: https://issues.apache.org/jira/browse/CXF-6941
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 3.1.6
>         Environment: Mac
>            Reporter: Neal Hu
>             Fix For: 3.2.0, 3.1.8
>
>
> http://stackoverflow.com/questions/11889997/how-to-send-a-array-in-url-request
> Spring MVC and PHP support send comma separated array in the url request:
> http://localhost:8080/MovieDB/GetJson?name=Actor1,Actor2,Actor3&startDate=20120101&endDate=20120505
> @RequestMapping(value = "/GetJson", method = RequestMethod.GET) 
> public void getJson(@RequestParam("name") String[] ticker, @RequestParam("startDate")
String startDate, @RequestParam("endDate") String endDate) {
>    //code to get results from db for those params.
>  }
> Now jax-rs only support below:
> http://localhost:8080/JerseyPojo/jaxrs/BasicResource/test?nameList=xx&nameList=xxx&nameList=ddd
> {code:java}
> @Path("/test")
>     @GET
>    public String getQueryList(@QueryParam("nameList") List<String> nameList) {
>         return "name list is: " + nameList.size() + nameList.toString();
>     }
> {code}
> When we migrate from Spring MVC to jax-rs, found problem.
> Neal



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message