SEND JSON DATA IN URL AS REQUEST PARAMETERS IN JAVA

sandy taylor

Total Post:46

Points:324
Posted by  sandy taylor
 1357  View(s)
Ratings:
Rate this:

I want to send json data in url as below .

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

How can I do this?

  1. Maria Susan

    Post:29

    Points:107
    Re: Send json data in url as request parameters in java

    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 Apr-06-2018 05:51:33 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!