We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally posted by eydun September 12, 2023 My login-request returns a token, which I am able to capture with jsonpath.
But before I can use this token for authorization in the second request, I need to base64 encode it. Is that possible?
Add base64Encode/base64Decode filter.
base64Encode
base64Decode
GET https://foo.com/data.bin HTTP 200 [Asserts] bytes base64Encode == "SGVsbG8=" body == "Hello"
Note: to be more useful, we need to have also a filter going from bytes to string for instance utf8Encode/utf8Decode:
utf8Encode
utf8Decode
GET https://api.foo.com HTTP 200 [Asserts] jsonpath "$.data" base64Decode == hex,534756736247383d; jsonpath "$.data" base64Decode utf8Decode == "Hello" jsonpath "$.data" utf8Encode base64Encode == "SGVsbG8="
? Do we need a strEncode "encoding"/strDecode "encoding" filter with arbitrary encoding ? Like strEncode "gb-2317"
strEncode "encoding"
strDecode "encoding"
strEncode "gb-2317"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Discussed in #1921
Originally posted by eydun September 12, 2023
My login-request returns a token, which I am able to capture with jsonpath.
But before I can use this token for authorization in the second request, I need to base64 encode it. Is that possible?
Add
base64Encode
/base64Decode
filter.base64Encode
: input is in bytes, output is a stringbase64Decode
: input is a string, output is bytesNote: to be more useful, we need to have also a filter going from bytes to string for instance
utf8Encode
/utf8Decode
:utf8Encode
: input is a string, output is in bytesutf8Decode
: input is in bytes, output is a string? Do we need a
strEncode "encoding"
/strDecode "encoding"
filter with arbitrary encoding ? LikestrEncode "gb-2317"
The text was updated successfully, but these errors were encountered: