-
Notifications
You must be signed in to change notification settings - Fork 24
Add http and restjson1 client protocols #448
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
Conversation
4b56b21 to
5eafa15
Compare
| for val in self.document_value["http"]: | ||
| assert isinstance(val, str) | ||
| self.http.add(val) | ||
|
|
||
| if vals := self.document_value.get("eventStreamHttp") is None: | ||
| object.__setattr__(self, "eventStreamHttp", self.http) | ||
| else: | ||
| # check that eventStreamHttp is a subset of http | ||
| assert isinstance(vals, Sequence) | ||
| for val in self.document_value["eventStreamHttp"]: | ||
| assert val in self.http | ||
| assert isinstance(val, str) | ||
| self.eventStreamHttp.add(val) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have validators to validate this kind of constraint model-side, but this would be good time to discuss whether we do any kind of validation in our trait definitions here. Thoughts?
fa3d584 to
4cc6a07
Compare
72d312f to
17eb3b2
Compare
01d3d53 to
9882b57
Compare
9882b57 to
3ac5a2f
Compare
3ac5a2f to
4b6ba2c
Compare
| uri_builder.port = uri.port | ||
| if uri.path: | ||
| uri_builder.path = os.path.join(uri.path, uri_builder.path or "") | ||
| # TODO: merge headers from the endpoint properties bag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll be under headers in the properties bag. Not necessary right now though.
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.