Forum Discussion

EdPrescott's avatar
EdPrescott
New Contributor
11 years ago

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

    • Rick1's avatar
      Rick1
      New Member

      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