Service Virtualization

 View Only
  • 1.  get parameters via x-www-form-urlencoded

    Posted Sep 10, 2020 12:44 PM
    Hello everyone!

    I am virtualizing a service where the request body is passed through an x-www-form-urlencoded and I would like to know how it is possible to capture the value of the parameters using devtest in a script execution step. can anybody help me?

    Thank you!

    ------------------------------
    Michel Silva
    Capgemini
    ------------------------------


  • 2.  RE: get parameters via x-www-form-urlencoded

    Posted Sep 10, 2020 03:56 PM
    Hi Michel,

    The body for x-www-form-urlencoded messages is in below format:

    firstValue=Vaibhav&secondValue=Jain

    To parse the arguments out of this body, you can use an additional data protocol "Delimited Text Data Protocol". Post this you should be able to parse the message as below:


    Thanks


    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------