Forum Discussion

TesterVin's avatar
TesterVin
Occasional Contributor
11 years ago

hoe to pass data in the form of x-www-form-urlencoded

Hi,

Our requirement is to pass username and password data through body request in the form of x-www-form-urlencoded not Json

Here, is the json format
{
"grant_type": "password",
"username": "**********",
"password": "*********"
}

Please let me know how to convert this type into application/x-www-form-urlencoded" format in SOAP UI.

Please do reply
  • TesterVin's avatar
    TesterVin
    Occasional Contributor


    This is basically Rest based service and request has to be sent as x-www-form-urlencoded instead of Json

    Please find the attachments that are taken from Postman-Rest Client.
  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    If you are using a Rest Step within SoapUI all you have to do is manually edit the Media-Type. I believe the same is true for an HTTP Step.
  • TesterVin's avatar
    TesterVin
    Occasional Contributor
    Hi Paul,

    I've entered media type as "application/x-www-form-urlencoded" and passed rawdata as grant_type=password&username=uname@yahoo.com&password=pswd123

    Still I'm unable to fetch access token in the response. I've observed "Unexpected element: CData" in request Form data.



    Please let me know the format of application/x-www-form-urlencoded if i'm wrong

    Thanks