Yaak Logo
Yaak
Feedback/Need for request.body.path

Need for request.body.path

Ramin Banihashemi·3 months ago
ReleasedFeature RequestImprovement

I have a service that passes a JSON as the body, but then I need a verification hash structured with some parameters from the body as the header or in the same body (!).
For example.
this is the body:

{
"apiKey": "${[ API_KEY ]}", 
"code": "XXXX", 
"channel": "All", 
"timestamp": "${[ timestamp.unix() ]}", 
"mac": “…"
}

with the “mac” code composed as follows

hash.sha1(“apiKey=APIKEY&code=CODE&channel=CHANNEL&timestamp=TIMESTAMP&secret=SECRET“)

it would therefore be convenient to have something similar

hash.sha1("apiKey=request.body.path("apiKey")&code=request.body.path("code")&channel=request.body.path("channel")&timestamp=request.body.path("timestamp")&secret=SECRET")


Comments (3)

Sign in to leave a comment.

Gregory Schier

Gotcha. Will be in the next release

Gregory Schier
Gregory Schier
Type to search feedback...