Forum Discussion

mgroen2's avatar
mgroen2
Super Contributor
6 years ago

parametrize http request

Hi,

I have following question: I have a HTTP request which contains a value at the end of the call.

Like this:
http://xxxx/webApi/api/v1/clausules/123456

I want the value of 123456 to be set in a parameter/variable so that I can define/manage it in a variable.

How can I do this is in ReadyAPI?

I am currently using a trial license of ReadyAPI.

Thanks,
Mathijs Groen

 

3 Replies

  • jhanzeb1's avatar
    jhanzeb1
    Frequent Contributor

    Hi,

     

    You can store the value in custom property in the testCase/testSuite/project.

     

    Say you create a new custom property at a test case level and call it "resourceParam" - Store  "123456" as value.

     

    Use the below line to call it in your request to call the value.

     

    ${#TestCase#resourceParam}

     

    Thanks

    • Olga_T's avatar
      Olga_T
      SmartBear Alumni (Retired)

      Hi all,

       

      Thank you guys for your valuable replies!

       

      mgroen2, was your question answered? If so, could you please click the Accept as Solution button below the reply that answers your question best? This helps other users find the answer easier.


      Otherwise, do you have any additional details for us?

      We are looking forward to hearing from you.