SmartBear Connect 2018
Join us at SmartBear Connect 2018 on October 29th & 30th in Boston, MA.
Apply to speak and share your experience with the greater SmartBear Community
Reply
New Contributor

How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

Body of the request is in application/x-www-form-urlencoded format, this request do not work in any other format.

 

I tried to create this request by manually giving the value content-type as  application/x-www-form-urlencoded in Headers and body of the request in this format: grant_type=password&username=XXXX&password=XXXXX

 

But this is also not working, so please let me know how can I create this request in ReadyAPI?

Highlighted
Posts: 5,217
Registered: ‎05-17-2013

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

Use Media Type value as "application/x-www-form-urlencoded"
New Contributor

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

Please read the query carefully.

 

As mentioned there I already tried that, but that is not working.

Posts: 5,217
Registered: ‎05-17-2013

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

I think I read it carefully. It was mentioned Content-Type. It is suggested to use Media Type.
New Contributor

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

Media type is a predefined list in ReadyAPI that is not editable.

 

I tried passing Media type in Header but it takes value from list only. By default in request it takes value of Media Type as content type i.e. when we select any format of the request in Media type list, in request (Raw) it will be shown as content-type. Hence Media type and Content type is a something.

Posts: 5,217
Registered: ‎05-17-2013

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

It gives you the list. However, you can still edit, I guess.
New Contributor

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

I tried, that is not working.

Can you suggest some alternate way to do that ??

 

Posts: 5,217
Registered: ‎05-17-2013

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

What is the method you are trying to use?
Community Leader

Re: How to create a REST request with x-www-form-urlencoded content-type in ReadyAPI 2.1.0?

https://support.smartbear.com/readyapi/docs/projects/ui/request/request/vertical/rest.html

The media type of the request body. You can select one of the values from the drop-down list or enter your own value.