• Post Reply Bookmark Topic Watch Topic
  • New Topic

POSt method

 
Smari Oumaya
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i'm developing a REST web service with netbeans. My service gets data from a MYSQL database. I don't understand how to set a method POST to insert a new tuple in the database.
oumaya
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Do you mean that you do not know how to send a POST request to your RESTful web service?
The HTTP POST is to be set in the client when sending the request. The exact procedure for setting the request method depends on which client library you use. For instance, you can use Apache HttpClient, Jetty HTTP client or the HttpURLConnection in the Java SE API.
In the case of HttpURLConnection, here is an example:

Best wishes!
 
Smari Oumaya
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you,
i'm searching for a complete application to follow step by step.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the Jersey toolkit download includes examples.

Also the jersey site has lots of documentation.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!