From: Bill B. <bb...@re...> - 2011-02-15 13:11:14
|
YOu could just inject a map of the form paramters: @Consumes("aplication/x-www-form-urlencoded") public void post(MultivaluedMap<String, String> form) { ... } On 2/14/11 6:50 PM, Mark Petrovic wrote: > My REST API has a natural need to consume in an HTTP POST operation > String form parameters that look like "item.0=foo", "item.1=bar", > "item.2=blah", etc. As it turns out, item.0 is always present in the > call, but item.[1-N] are optional. > > Is there a clever way to construct the handling method signature (using > annotations, of course) that will allow me to elegantly consume such a > variable number of form parameters? iow, that will save me from > treating "theitems=escaped(item.0=foo&item.1=bar&item.2=blah)" as an > opaque value against a key theItems that my handler method must manually > parse? > > Thank you kindly. > > -- > Mark > > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > > > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |