8

It is legal (in some cases) to send get request with json data contained in the body. But soapui hides "body" subwindow where I can paste json string so only key-value pairs menu is available. Is there any workaround to send get request with body in soapui?

Cherry
  • 31,309
  • 66
  • 224
  • 364
  • Update to a later version. At some point this got fixed. – SiKing Feb 17 '15 at 17:50
  • version 5.2.1 does not allow that. – Cherry Jul 27 '16 at 06:00
  • I just checked and you are correct. I filed a bug with SmartBear about this sometime back, and they still have not fixed it in 5.2.1. In the -Pro (licensed) version you could do it using custom events: https://www.soapui.org/scripting---properties/custom-event-handlers.html – SiKing Jul 29 '16 at 21:07
  • Even with v5.2.1 you cannot send json in GET method. You should try POSTMAN to do that – Stef Nov 19 '16 at 09:53
  • Installed the latest 5.3 and I don't see a fix. Is there a workaround? – Win Man Dec 15 '16 at 22:08

1 Answers1

2

You can add json, choose application/json as Media type, as shown below. I use soapui release 4.5.1,free edition on linux.

enter image description here

Is this what you are looking for?

Community
  • 1
  • 1
Rao
  • 20,781
  • 11
  • 57
  • 77
  • Are you ensure that it is for GET http method? – Cherry Feb 19 '15 at 06:56
  • Sorry somehow it was not noticed. I believe that post method accepts payload in soapui. Are you sure that you can't get the data using parameters? – Rao Feb 19 '15 at 10:37
  • Sure :) Read about elasricsearch - attache body with GET method is common pratic on it. – Cherry Feb 20 '15 at 04:45
  • @Cherry Have you tried using groovy's [RESTClient](http://groovy.codehaus.org/modules/http-builder/doc/rest.html). I havent tried with `GET` though. You can give it a shot. – user1207289 Mar 20 '15 at 18:45
  • No, I have not. Could you post an example with that? – Cherry Jul 27 '16 at 06:00
  • @Rao are you able to take a look at this question please? https://stackoverflow.com/questions/46390574/soapui-restful-service-questions . Thanks –  Sep 24 '17 at 15:01