Forum Discussion

ZP's avatar
ZP
Occasional Contributor
4 years ago

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-external-file-as-Datasource-via/td-p/164141

 

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..

  • 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
  • richie's avatar
    richie
    Community Hero
    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
    • ZP's avatar
      ZP
      Occasional Contributor

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