Decoding Base64 json responses #3254
-
Hi Everyone, I believe currently there is no way to do this, but wanted to verify. if my response is a base64 encoded json, there is no way to decode this response and then assert using jsonpath correct? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @riteshnoronha, |
Beta Was this translation helpful? Give feedback.
-
Hi @riteshnoronha, As a workaround you can use a temporary base64 decoding api server.
|
Beta Was this translation helpful? Give feedback.
-
Just revisiting this issue, you can chain filters and decodes from base 64 then chain with a JSONPath filter:
The different "steps" of the chains are applied from left to right:
|
Beta Was this translation helpful? Give feedback.
Just revisiting this issue, you can chain filters and decodes from base 64 then chain with a JSONPath filter:
The different "steps" of the chains are applied from left to right:
body
get HTTP response bytes and decodes it to a stringbase64Decode
decodes the string to bytesdecode "utf-8"
: decodes bytes to string using "utf-8" encodingjsonpath "$.name"
apply a JSONPath query to a JSONbase64Decode
is available from Hurl 6.1.0