cancel
Showing results for 
Search instead for 
Did you mean: 

How to: POST REST request with JSON body (SoapUI Pro 4.6.1)

Highlighted
New Contributor

How to: POST REST request with JSON body (SoapUI Pro 4.6.1)

I need to POST to a REST endpoint a request with a JSON body, like




POST http://server/service/method


Content-Type: application/json


 




{ "hi" : "there" }



How can I do that?



2 REPLIES 2
Highlighted
Community Manager

RE: How to: POST REST request with JSON body (SoapUI Pro 4.6.1)


Hi Ed,


 


Refer to this SoapUI article. If it doesn't help, please repost your question in the SoapUI forum (this is the TestComplete forum).


 

---------
Tanya Gorbunova
SmartBear Community Manager

 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!
Highlighted
New Member

Re: RE: How to: POST REST request with JSON body (SoapUI Pro 4.6.1)

Hi ...

 

I'm a newbie in using ReadyAPI 

Blocked in here - trying to send "different sets of data" in json body using data source and data loop (Post method, REST web service)

One set of data in JSON body - all works well using post method for Rest service

Data source works fine as well BUT the issue arises when I use 'GetData' in json body and a data source loop
My JSON:

{ 'Topic' : 'EventName', 'Message' : ' { "EventAttribute" : Eventdata } ' } -

 

After setting up data source and data source loop, cleared the event data and right click and use 'GetData' to point to 'DataSource'

 

Result: only the last row in the data source feeds to event data and completes the test