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

Multi-body request templates #9

Open
pdylanross opened this issue Jan 11, 2022 · 0 comments
Open

Multi-body request templates #9

pdylanross opened this issue Jan 11, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@pdylanross
Copy link
Owner

Summary

Request templating currently only supports a single body, wheras path templating supports multiple paths. Body templating needs to be improved to become consistent with path templating.

Additional context

This should be easy to implement, however I've gone back and forth with the design of how I approach this.

Path templating is easy, we can just assume that a given path is only going to be a single line and any newline characters denote a new path. We cannot assume that about request bodies though. My gut reaction was to designate a separator string (IE the yaml --- you see in k8s resources all the time), however I wasn't sure how that approach sat with me.

It seems that some smarts around the request body content / content type would be very beneficial here. If we know the body is json, and the content contains multiple json objects, then we know that we can send multiple requests with different bodies. The downside of this approach is that we would need to implement this logic for each different content type we may end up seeing, and I'm no expert on deserialization logic.

@pdylanross pdylanross added the enhancement New feature or request label Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant