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

Allow specifying an alternate method of getting a raw body #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mattmatters
Copy link
Contributor

This can be used if the raw body is located elsewhere in the conn.

In our situation we already are pattern matching on the path in the Phoenix endpoint module with the util added in the test which came from the Bytepack archive, so this felt much cleaner to support in the plug than define another alternate route that stores raw bodies slightly different.

No worries if this doesn't interest you all, I'm using it on my project from my fork!

This can be used if the raw body is located elsewhere in the conn.

In our situation we already are pattern matching on the path in the
Phoenix endpoint module with the util added in the test which came
from the
[Bytepack archive](https://github.com/dashbitco/bytepack_archive/blob/main/apps/bytepack_web/lib/bytepack_web/extensions/plug/body_reader.ex),
so this felt much cleaner to support in the plug than define another
alternate route that stores raw bodies slightly different.
Copy link
Collaborator

@moroz moroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both PRs look very good, but I need to wait for approval before I can merge and deploy these within our company's internal services.

test/ex_twilio_webhook/plug_test.exs Outdated Show resolved Hide resolved
Co-authored-by: Karol Moroz <k.j.moroz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants