wood burning stoves 2.0*
The moose likes Web Services and the fly likes Rest Assured in a POST service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Rest Assured in a POST service" Watch "Rest Assured in a POST service" New topic
Author

Rest Assured in a POST service

pasquale vitale
Greenhorn

Joined: Aug 22, 2008
Posts: 10
Hi everyone,
I'm new in Rest Assured.
I have my Rest service like this:



Now, I want to use RestAssured to call my "hello" service but I don't know how can I do it.
In the first example, I had a GET method and I've used:



Please note that my hello method takes a name parameter.
Could you help me?

Regards
pasquy73
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

I haven't tried this myself, but did you try the example listed in here? There are some related to post request.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
pasquale vitale
Greenhorn

Joined: Aug 22, 2008
Posts: 10
Thank you,
Vijitha

I've resolved my issue; I've used
.with().body("body")

and I need to xml in header:
headers.put("Content-Type", "application/xml");

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rest Assured in a POST service