How to avoid encoding the key of request parameters being encoding

Posted by fxp on Stack Overflow See other posts from Stack Overflow or by fxp
Published on 2012-11-05T16:58:05Z Indexed on 2012/11/05 17:00 UTC
Read the original article Hit count: 423

Filed under:

I'm trying to send a http request using WS.url() with a action receive a custom class parameter like

public static void add(@Valid MyPage info) {...}

There is a Map in MyPage

@Required
public Map<String, String> content = new HashMap<String, String>();

But When I try to send a request with

WS.url().setParameter("info.content[name]","mynameis");

The action got no parameter and request's querystring convert info.content[name] into ...%5Bname%5D... I checked the WS.createQueryString and found it will encode all key and value. Any way to avoid that?

© Stack Overflow or respective owner

Related posts about playframework