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

feat(http): proof template body structure parses (e.g., JSON) #57

Open
Tracked by #46 ...
Autoparallel opened this issue Aug 23, 2024 · 2 comments
Open
Tracked by #46 ...

feat(http): proof template body structure parses (e.g., JSON) #57

Autoparallel opened this issue Aug 23, 2024 · 2 comments
Assignees
Labels

Comments

@Autoparallel
Copy link
Contributor

No description provided.

@devloper
Copy link

On the request side, for efficiency sake, I think we should not support assertions on the JSON content out the gate. Perhaps purely substring match or some type of template-based matching?

Given template:
{ "user_id": [[match_expression_1]], "query": true, "thing", "my favorite thing" }

and:
match_expression_1(len=64, content_type=base64, value_type="string")

Roughly my thinking here is on the request side we can guarantee a certain structure because our SDK should be preparing the request, so instead of parsing the full object (which is less efficient), we might be able to get away with a reduce string match and some type of basic templating.

I'm open to the idea that his is premature optimization, just wanted to share the thinking.

@Autoparallel
Copy link
Contributor Author

@lonerapier @devloper

What do we think of this issue? I'm tempted to close it or have it explained better. We currently extract the body of a HTTP req/resp as needed, though we probably need codegen for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants