K4mczi
K4mczi

Reputation: 397

SoapUI, request body in get method?

I dont see any options i need to put json body in my get request enter image description here

Upvotes: 2

Views: 9946

Answers (2)

Irek L.
Irek L.

Reputation: 334

That is because GET should not have body by the definition. For GET all parameters should be inside URL (path and querystring) and Headers. If you need to have a body you should use POST or PUT.

Upvotes: 3

Steen
Steen

Reputation: 873

I think you a confusing GET and POST.

http://hostname/path?param1=value1&param2=value2&param3=value3

This is a GET string. There is no body. All parameters are delivered as a part of the GET string. Everything after "?" are considered parameters, and they are separated by "&" and name-value pairs are separated by "="

If you have a JSON body, that you want to submit, you need to do a POST. Once you have created a REST teststep, which is configured to do a POST, the textbox for editing your body should show up as expected.

Upvotes: 1

Related Questions