user2512057
user2512057

Reputation: 51

play framework WS API always escape character ';' and '=' in URL

When I send a URL like abc.efg.com/query?para1=cat;para2=dog, play WS API always convert it to abc.efg.com/query?para1=cat%03Bpara2%03Ddog. Of course, there are http:// in the beginning in the URL. my code is as below. val url= "http://abc.efg.com/query?para1=cat;para2=dog" val response = WS.url(url).get()

When I use fidder or netmon to look at the data that sent to sever, I found play framework WS (2.1.5) always change to the URL above I mentioned. How do I tell WS not to convert?

Upvotes: 0

Views: 142

Answers (1)

Will Sargent
Will Sargent

Reputation: 4396

The semicolon is an alternate syntax to ampersand (&) as a seperator for query parameters, so it must be encoded.

If you want multiple query parameters, you should use withQueryString.

Upvotes: 1

Related Questions