Aws Ahmed
Aws Ahmed

Reputation: 81

sending URL with special characters through Http (android)

I'm trying to execute an URL that will pass two parameters of location coordinates that include a comma (",") but the url is being fetched differently (without the comma) therefore the webservice is returning null.

new JSONTask2().execute("http://server/WEService.svc/sendloc/56/39,911437/32,809107");

Upvotes: 0

Views: 410

Answers (1)

buczek
buczek

Reputation: 2050

You can use %2c in the URL to replace the commas.

With your URL being dynamic, you can use url = url.replace(",", "%2c");

Upvotes: 1

Related Questions