Submit and vote on feature ideas.

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.

Virtualize JSON Responder - GET. How to Get Details?

Options
lukeliwanag
lukeliwanag Posts: 36

Hi Everyone,

I need to create a responder to accomodate a GET Rest request sample below:

GET /path/{safsadfsadgsadfgsaf}/status HTTP/1.1
Accept: application/json
User-Agent: ApplicationName/1.0 (env=test; user=testername)
X-Request-ID: 123124asdfasdfasdf1124

How do i get the detail that's between {}? as this is changing every request.

Tagged:

Comments

  • OmarR
    OmarR Posts: 234 admin
    edited July 2017
    Options

    Good morning Luke,

    There is a sweet new tool that was introduced in SoaVirt 9.10.2 called the "REST URL Data Bank". The tool can be chained as the output for an Incoming Transport Header to easily extract values from incoming Request URLs and store them in a databank for later use.

  • lukeliwanag
    lukeliwanag Posts: 36
    Options

    Hi Omar,

    thank you for your response. However we're currently at 9.10.1.. are there any options there?

  • OmarR
    OmarR Posts: 234 admin
    Options

    Additionally, if you do not have the latest version of SoaVirt, you can also accomplish this by using a text databank. Simply provide the left and right-hand boundaries to isolate the desired values. This will work for dynamic values that are in a fixed path.

  • lukeliwanag
    lukeliwanag Posts: 36
    Options

    This is great! Thanks Omar