Home > DeveloperSection > Forums > Send json data in url as request parameters in java
sandy taylor
sandy taylor

Total Post:46

Points:324
Posted on    November-12-2014 10:51 PM

 Java JSON  Http Request 
Ratings:


 1 Reply(s)
 799  View(s)
Rate this:

I want to send json data in url as below .

editTest.jsp?details=123456789-{"aNumber":2}

How can I do this?



Maria Susan

Total Post:29

Points:107
Posted on    November-13-2014 12:19 AM

URL encode your details parameter:

 

String otherParameter = "123456789-";   

String jsonString = "{\"aNumber\":2}";

String url = "editTest.jsp?details=" + URLEncoder.encode(otherParameter + jsonString, "UTF-8");


Modified On Nov-13-2014 12:19:42 AM

Don't want to miss updates? Please click the below button!

Follow MindStick