Can we get a new WS.GET method?

Asked by Phil Wilson

Hi, I wrote my first Play application at the weekend, and it was consuming a URL which had a number of parameters.

Could we get:

a) some better documentation on the WS.GET(String, Object...) method (I ended up looking at the source to see how the params were meant to be formatted)

b) a method along the lines of WS.GET(String, HashMap<String, String>)?

The only implementation I can think of immediately is something like

Iterator t = params.entrySet().iterator();
StringBuffer sb = new StringBuffer(10);

while (t.hasNext()) {
    Map.Entry param = (Map.Entry)t.next();
    sb.append(param.getKey()+"="+param.getValue());
    if (t.hasNext()) {
        sb.append("&");
    }
}

which isn't very efficient, but would have been very useful on sunday ;)

Cheers.

Question information

Language:
English Edit question
Status:
Solved
For:
play framework Edit question
Assignee:
No assignee Edit question
Solved by:
Phil Wilson
Solved:
Last query:
Last reply:
Revision history for this message
Guillaume Bort (guillaume-bort) said :
#1

Ok thank. I add a feature request.

Revision history for this message
Phil Wilson (x-launchpad-philwilson-org) said :
#2

Thanks.