Response body data in body post request #716
Replies: 7 comments 5 replies
-
Could you please provide the full configuration? You may redact sensitive values. And what version of Monika did you use? If we take a look at the example:
There are two request inside a probe. The first request will return this:
The second request will get the first ID of the data from the response body. So the second request will be reqres.in/api/users/1
|
Beta Was this translation helpful? Give feedback.
-
Hi @dennypradipta Here is the configuration file with two issues. AND url that does not work.
|
Beta Was this translation helpful? Give feedback.
-
Git wont let me add the yaml file and when I insert code its fine if its a simple insert, but when I insert full yaml it breaks out of code insert?? not sure how to get you the full yaml in code form |
Beta Was this translation helpful? Give feedback.
-
Hmmm, are your API by chance returning the access_token like this?
If yes, then you may need to access it by |
Beta Was this translation helpful? Give feedback.
-
Absolutely! Monika is an awesome product, I'm excited to see the growth and the maturity! |
Beta Was this translation helpful? Give feedback.
-
Hi folks, let's goooooo #738 🚀 |
Beta Was this translation helpful? Give feedback.
-
Hi @rgraham7503 We've added this missing functionality. Let us know what you think! |
Beta Was this translation helpful? Give feedback.
-
I do not see a way to use a previous response body data value in a new request body.
example:
probe id 1 gets an access token
probe id 2 wants to do an introspect on the access token from probe id 1.
Introspect endpoint requires 3 elements in the body
body:
token: tokenvalue
client_id: "xxxx"
client_secret: "xxxx"
I am trying to use the access token from the response body of probe id 1 in the body of probe id2
body:
token: {{response.[0].data.access_token}}
client_id: "xxxx"
client_secret: "xxxx"
This spits out an error :
_err = new cli_2.CLIError(input, options);
^
CLIError: missed comma between flow collection entries (75:31)
72 | timeout: 7000
73 | url: https://xxxx/oidc/endpoint/def ...
74 | body:
75 | token: {{{response.[0].data.access_token}}}_
Beta Was this translation helpful? Give feedback.
All reactions