I want to create a REST Jersey Web-Service accepting JSON string as input parameter.
Also I will use post requestand from webmethod I will return one JSON string.
How can I consume this in a HTML page using Ajax post request. I want to know what all changes I need to make it on web method to accept JSON String.
public class Hello {
@POST
public String sayPlainTextHello() {
return "Hello Jersey";
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With