Service Virtualization

Expand all | Collapse all

How to use HTTP/HTML step to send data in body instead of key/value pair

Jump to Best Answer
  • 1.  How to use HTTP/HTML step to send data in body instead of key/value pair

    Posted 05-29-2020 05:36 AM
    Need to use SSL feature enabled on HTTP/HTML Request step , but need to pass data only as body. This step is only taking as key-value pair in both URL and POST Params. I can use REST step to post data as like body , but that step doesn't has SSL feature.

    I need the combination of SSL + REST step to send data as Body.

    Any quick suggestion would be helpful. Thank you.


  • 2.  RE: How to use HTTP/HTML step to send data in body instead of key/value pair

    Posted 05-29-2020 06:23 AM
    Hi Naga,

    To enable HTTPs connections from rest step:

    After configuring your ssl cert details in properties file. Try adding below param in your workstation.vmoption file and restart the same:

    -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2


    Thanks

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



  • 3.  RE: How to use HTTP/HTML step to send data in body instead of key/value pair

    Posted 05-29-2020 07:02 AM
    Thanks Vaibhav for the reply, Requirement is to pass SSL details includes KeyStore, pwd of cert, Alias name etc along with data to be passed as body. HTTPs connections from REST step are working fine even without adding the vmoptions file.

    Need a combination of both below steps.




  • 4.  RE: How to use HTTP/HTML step to send data in body instead of key/value pair
    Best Answer

    Posted 05-29-2020 07:12 AM
    Hi Naga,

    What i meant,  you can configure the ssl related properties in local.properties file as below
    ## ssl.client.cert.path
    ## ssl.client.cert.pass
    ## ssl.client.key.pass
    ## ssl.client.alias

    and then add the value "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" in workstation.vmoption file and restart. Now, the Rest step should use the associated certs to make https calls.

    As per my understanding, there is no other option of passing cert details in REST step OOB.

    Thanks.

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



  • 5.  RE: How to use HTTP/HTML step to send data in body instead of key/value pair

    Posted 05-29-2020 08:50 AM
    thanks Vaibhav. This solution has worked on local ITR execution. I may have issue when i stage it as server is having its own server cert. We will try changing to this API cert details on server and stage.


  • 6.  RE: How to use HTTP/HTML step to send data in body instead of key/value pair

    Posted 05-29-2020 07:11 AM
    Hi Naga
            For REST test step, you can directly use HTTPS protocol. You would need additional SSL properties only if the SSL Server expect client to be authenticated.

    image.png

    --
    regards
    Sankar Natarajan