cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to use JSON Data from external file against the PATCH/PUT request?

SOLVED
Highlighted
Occasional Contributor

Possible to use JSON Data from external file against the PATCH/PUT request?

In ReadAPI (SOAPUI),

 

I have a need to submit multiple patch JSON requests that are stored in the directory. 

 

Q1) I have looked at the following solution that works for the POST requests but i am not sure if this will work for the PUT/PATCH requests too? I don't think it is working correctly against PATCH.

https://community.smartbear.com/t5/API-Functional-Security-Testing/How-to-extract-JSON-data-from-ext...

 

Q2) Also the request is going to have the parameters in them. Does the parameter values gets considered while submitting PATCH requests in such a way?

 

Thanks for your help..

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Possible to use JSON Data from external file against the PATCH/PUT request?

Hey @ZP,

Answer to Q1. The method shouldn't make any difference. I've used both PUT, PATCH and POST using a datasource (directory) step and it worked fine. What version of ReadyAPI! are you using? More importantly, what makes you believe it's not working correctly?

Answer to Q2. Can you rephrase your question please? as i'm not understanding the question you asked.
In the meantime however, REST requests by definition supports parameters (either URI/Resource/Template or Query, or Matrix, or Header parms).
You can also parameterise attributes in the payload you are submitting. The parameters form part of the request.

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
Highlighted
Community Hero

Re: Possible to use JSON Data from external file against the PATCH/PUT request?

Hey @ZP,

Answer to Q1. The method shouldn't make any difference. I've used both PUT, PATCH and POST using a datasource (directory) step and it worked fine. What version of ReadyAPI! are you using? More importantly, what makes you believe it's not working correctly?

Answer to Q2. Can you rephrase your question please? as i'm not understanding the question you asked.
In the meantime however, REST requests by definition supports parameters (either URI/Resource/Template or Query, or Matrix, or Header parms).
You can also parameterise attributes in the payload you are submitting. The parameters form part of the request.

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

Highlighted
Occasional Contributor

Re: Possible to use JSON Data from external file against the PATCH/PUT request?

Works fine for PUT/Patch too as confirmed by Richie....Thanks

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors