Closed
Description
from following link https://www.jetbrains.com/help/idea/exploring-http-syntax.html#per_request_variables
< {%
request.variables.set("firstname", "John")
%}
GET http://example.org/{{firstname}}
And
< {%
const signature = crypto.hmac.sha256()
.withTextSecret(request.environment.get("secret")) // get variable from http-client.private.env.json
.updateWithText(request.body.tryGetSubstituted())
.digest().toHex();
request.variables.set("signature", signature)
const hash = crypto.sha256()
.updateWithText(request.body.tryGetSubstituted())
.digest().toHex();
request.variables.set("hash", hash)
%}
POST https://httpbin.org/post
X-My-Signature: {{signature}}
X-My-Hash: {{hash}}
Content-Type: application/json
the script not works.
Metadata
Assignees
Labels
No labels
Activity