Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Zip File Responder

alemayehu_bofa
alemayehu_bofa Posts: 15

Hello,

I am looking for REST API to create a message responder whose endpoint returns a zip file hosted in a virtualize server.

Thank you!

Answers

  • williammccusker
    williammccusker Posts: 689 ✭✭✭

    Hi,

    Is the file already zipped and the responder just needs to return it? Does the request specify what file needs to be returned?

  • alemayehu_bofa
    alemayehu_bofa Posts: 15

    Hi williammccusker, thanks for the reply... yes, that is the intention. For each VA, there is an associated zipfile. I want to be able to retrieve it with an end point containing the VA name and then a path, say /getzipfile.... thanks again.

  • williammccusker
    williammccusker Posts: 689 ✭✭✭

    Hi,

    It sounds like the file name with be in the URL path of the request. In that case the process would involve using the REST URL Data Bank to extract the file name from the path and storing it in a variable. Then in a Responder the "literal input" mode has an option to load a file and use that as the response. You would use the variable as the file name and then set the appropriate content-type for the response.

    Hope this helps!

  • alemayehu_bofa
    alemayehu_bofa Posts: 15

    this is helpful.. will check it out ... thanks again!