• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rest Assured in a POST service

 
pasquale vitale
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tried this myself, but did you try the example listed in here? There are some related to post request.
 
pasquale vitale
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic