I want to create a sample website in Java that includes all four CROID operations and I have posted it in the Tomcat. . I used the JX-RS (Jersey) Library to apply it in Java. Up to now, I can call the GET method and display it to retrieve the list of records. But I do not know how to call post, put, and delete method. Can anyone say those ways to call?
Give it a shot, you can remove the key / value joints on the server side very easily :
Configure client config = new default client configured (); Com.sun.jersey.api.client.Client Client = com.sun.jersey.api.client.Client.create (config); Multivellam FormData = New MultivimMapMap (); FormData.add ("key", "value"); WebResource resources = client.resource ("http: // path / to / resources"); Client Response Response = Resources Type ("app / x-www-form-urxed"). Post (Client Response Class, FormData);
Comments
Post a Comment