Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
15 years ago

how to make json rest request ?

Hello,
Is it possible to make a json rest requests from soapUi , with the capability of being able to set the individual fields for the json request body. Currently soapUi has a component that can generate a WADL for a rest response (is it possible to generate a schema given a sample rest request construction?).

If not, is posting the entire request as the post body the only way to make a JSON request in soapui ?

2 Replies

  • Hello,

    Currently the posting of the entire request in the post body is what is supported for JSON requests. We'll add this to our backlog and see to include it in next release.

    hope this helps,
    robert
  • Hello,

    You can also use Property Expansions to achieve this. For this you would create a Properties TestStep and create the properties you wish to use in your request. Then in the actual request body, you would use the Property Expansions, for example:


    //Properties TestStep:
    username: MyUsername
    password: p4ssw0rd


    //Request Body:
    {
    action: "login",
    username: "${Properties#username}",
    password: "${Properties#password}"
    }


    Regards,
    Dain
    eviware.com