Ask a Question

How to convert Postman POST Request to POST Request in ReadyAPI 3.0.0

SOLVED
supriyabora89
Occasional Visitor

How to convert Postman POST Request to POST Request in ReadyAPI 3.0.0

I am trying to create a POST request in Ready API 3.0.0 where I want to replicate a Postman request where all the content in mentioned in the body tab as the screenshot below:

supriyabora89_3-1614683537499.png

 

How can I create the same request in Ready API, so far I was able to add REST Request and mention the URL, but I want to give me parameters in JSON,

1. How do I do that in the correct way, so that I dont get Bad Request error.

2. Also, am I using the correct approach to create the above Postman request in Ready API? Or should I select "multipart/form-data" as the Media Type, if should how should that be done?

supriyabora89_2-1614683491322.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
richie
Community Hero

Re: How to convert Postman POST Request to POST Request in ReadyAPI 3.0.0

Hey @supriyabora89 

 

I think I remember the 'form-data' radio button in Postman equates to the 'multipart/form-data' MediaType combo box in ReadyAPI! (which generates a 'Content-Type' header of 'multipart/form-data' type value).

 

You could double check by checking the headers on your successful Postman request and then you could alter ReadyAPI!'s settings accordingly to match.

 

If my memory is correct - I tested two endpoints that supported multipart/form-data types - one of them didn't support types of application/json, whereas one endpoint did - so I was able to just change the MediaType to application/json in ReadyAPI! when I did this before - however, it all depends on what your endpoint supports.

 

By the way - did I read your ReadyAPI! screenshot correctly?  You have a json payload and one of the values in the json payload is actually wellformed XML?  That's weird.

 

The other option (and this has never really worked for me, but still) - you could try exporting your Postman collection and then use ReadyAPI!s Postman plugin to import the collection - this in theory, should do all the transformation required so you shouldn't have to bother worrying about type options at all.  Just a suggestion - some people have a lot of success with the Postman plugin - I never did whenever I tried it,

 

ta

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

2 REPLIES 2
richie
Community Hero

Re: How to convert Postman POST Request to POST Request in ReadyAPI 3.0.0

Hey @supriyabora89 

 

I think I remember the 'form-data' radio button in Postman equates to the 'multipart/form-data' MediaType combo box in ReadyAPI! (which generates a 'Content-Type' header of 'multipart/form-data' type value).

 

You could double check by checking the headers on your successful Postman request and then you could alter ReadyAPI!'s settings accordingly to match.

 

If my memory is correct - I tested two endpoints that supported multipart/form-data types - one of them didn't support types of application/json, whereas one endpoint did - so I was able to just change the MediaType to application/json in ReadyAPI! when I did this before - however, it all depends on what your endpoint supports.

 

By the way - did I read your ReadyAPI! screenshot correctly?  You have a json payload and one of the values in the json payload is actually wellformed XML?  That's weird.

 

The other option (and this has never really worked for me, but still) - you could try exporting your Postman collection and then use ReadyAPI!s Postman plugin to import the collection - this in theory, should do all the transformation required so you shouldn't have to bother worrying about type options at all.  Just a suggestion - some people have a lot of success with the Postman plugin - I never did whenever I tried it,

 

ta

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

sonya_m
Community Manager

Re: How to convert Postman POST Request to POST Request in ReadyAPI 3.0.0

Thank you for helping here, Richie!

 

@supriyabora89 was Richie's reply helpful?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: