alexandrehtrb / Pororoca

An API testing tool with support for HTTP/2 and HTTP/3. Alternative to Postman.
https://pororoca.io
Other
500 stars 38 forks source link

Capture response values into variables #44

Closed alexandrehtrb closed 1 year ago

alexandrehtrb commented 1 year ago

Postman and other HTTP inspectors can have scripts that capture response values into variables. We can have the something similar in Pororoca.

At first, just JSON value capture into an ephemerous environment variables - no scripting. For simplicity, require that for value capture, an environment should exist and be active (no ephemerous variables in collection level, only in environment level).

Example response (object):

{"obj":{"id":1}}

Capture table:

Capture Target variable
root.obj.id MyVariable

Example response (array):

[{"id":1}]

Capture table:

Capture Target variable
root[0].id MyVariable
alexandrehtrb commented 1 year ago

Done, will be published in next release