-
Notifications
You must be signed in to change notification settings - Fork 61
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
tide sdk and example #117
tide sdk and example #117
Conversation
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
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.
Sounds good overall, I left some minor comments. Sorry for the late response
cloudevents-sdk-tide/Cargo.toml
Outdated
@@ -0,0 +1,28 @@ | |||
[package] | |||
name = "cloudevents-sdk-tide" | |||
version = "0.0.1" |
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.
This should match the sdk version
|
||
let versionheader = match self.headers.get("ce-specversion") { | ||
Some(s) => s.as_str(), | ||
None => "", |
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.
No spec version should fail
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.
Thanks for this @slinkydeveloper I will take a look and update
Signed-off-by: Jens Reimann <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Hey @slinkydeveloper I also took a look at the your spec version comment and I'm not quite sure about where the problem is. In the code a bad version would fail at the next line I have also taken a further look at the API and made it async and enhanced the request test to include time. |
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
Signed-off-by: Anthony Whalley <[email protected]>
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.
This PR contains changes unrelated to tide, can you move them out of this PR?
@@ -162,7 +160,7 @@ mod tests { | |||
//TODO this is required now because the message deserializer implictly set default values | |||
// As soon as this defaulting doesn't happen anymore, we can remove it (Issues #40/#41) | |||
.time(time) | |||
.source(Url::from_str("http://localhost").unwrap()) | |||
.source("http://localhost") |
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.
Can you move these changes to actix-web and reqwest in another PR?
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.
Can you rebase?
Ok(()) | ||
}, | ||
) | ||
.with_protocols(&["cloudevents.json"]), |
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.
That's cool!
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.
I'll look at the rebase
Can you rebase the library to work with the new package reorg? |
Closing as the requirement I was building for has been superseded by #202 |
Signed-off-by: Anthony Whalley [email protected]
This PR adds support for tide, the server framework of http-rs.
https://github.com/http-rs/tide
It uses 0.3.1 of the cloud events library.
The code follows the actix implementation
but avoids using the async-trait library as it wasn't clear what the benefit of that would be and async-trait comes with a warning on performance.I'd appreciate any feedback and hope someone can spare some time to land this.