Skip to content
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

Builtin for reading request/response body #274

Open
fredmaggiowski opened this issue Oct 12, 2023 · 0 comments
Open

Builtin for reading request/response body #274

fredmaggiowski opened this issue Oct 12, 2023 · 0 comments
Labels
enhancement New feature or request service

Comments

@fredmaggiowski
Copy link
Member

Is your feature request related to a problem? Please describe

Provide a custom builtin to read the request/response body from a policy; a built-in could allow a user to avoid configuring the OAS with special flags to prevent reading the body (e.g. #273).

Note: the Built-in should have access to the original http request/reponse to be able to read the contents and refresh the buffer to make it available to be proxied

Describe the solution you'd like

It would be nice to be able to write a policy like:

my_policy {
   body := read_request_body()
}
my_policy {
   body := read_response_body()
}
@fredmaggiowski fredmaggiowski added enhancement New feature or request service labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request service
Projects
None yet
Development

No branches or pull requests

1 participant