New issue
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
Make http.send accept any json variant as application/json #6684
Comments
Sounds like a reasonable improvement to me. If you'd like to submit a PR, that'd be neat 🙂 |
"For more information, please re-read." -- I've removed my comment re force_json_decode, you're already aware. 😅 |
💭 Right now, application/json is json-decoded, and application/yaml + application/x-yaml are yaml-decoded. So if we go with users_request := {
"url": "https://scimserver/Users",
"method": "GET",
"headers": {
"x-api-key": "secret",
"accept": "application/scim+json"
}
} would this mean it should do JSON? How would I declare that a certain extra header value means that it should be treated as YAML? |
No, my suggestion was not to use the "accept" header, that's just to show a correct SCIM request body. My suggestion is to be lenient about the returned |
Ah! Thanks for clarifying. Yeah, that makes this a bit simpler. |
This method handles the response processing which would need to be updated I think. Feel free to submit a PR if you'd like. Thanks. |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue. |
What is the underlying problem you're trying to solve?
Our SCIM server returns
application/scim+json
as aContent-Type
header. We need to enableforce_json_decode
to get theraw_body
parsed intobody
.Describe the ideal solution
It would be nice if opa would understand that
application/variant+json
is just a variant ofapplication/json
for anyvariant
of json so it would not be necessary to addforce_json_decode
to the request body.Describe a "Good Enough" solution
... would return a valid decoded body in the result.
The text was updated successfully, but these errors were encountered: