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
null
Describe the bug The array may evaluate to null and therefore encodes respectively to null.
To Reproduce Steps to reproduce the behavior:
couper version
docker run --entrypoint=/couper avenga/couper version
master 2021-03-29 acfce46
*.hcl
server "custom-response" { endpoint "/**" { request { url = "https://httpbin.org/anything?a=${req.id}" body = json_encode({ foo = [] bar = ["bar"] }) } response { body = json_encode(beresp.json_body.json) } } }
curl
curl -v http://localhost:8080/
Result:
$ http localhost HTTP/1.1 200 OK Connection: close Content-Encoding: gzip Content-Length: 47 Date: Thu, 18 Mar 2021 18:02:26 GMT Server: couper.io Vary: Accept-Encoding
{"bar": ["bar"], "foo": null }
Expected behavior
{"bar": ["bar"], "foo": []}
The text was updated successfully, but these errors were encountered:
Could be related to #165
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
The array may evaluate to
null
and therefore encodes respectively tonull
.To Reproduce
Steps to reproduce the behavior:
couper version
ordocker run --entrypoint=/couper avenga/couper version
master 2021-03-29 acfce46
*.hcl
. Remove sensitive data.curl
call for reproductioncurl -v http://localhost:8080/
Result:
Expected behavior
The text was updated successfully, but these errors were encountered: