-
Notifications
You must be signed in to change notification settings - Fork 170
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
upgrade to hyper v1.0 #1368
upgrade to hyper v1.0 #1368
Changes from 21 commits
93c7dc2
38bcfd4
5ffd811
e764e33
4a61aed
58b725c
efc92be
103add0
0d9be00
3232128
642d964
1af0511
8c6a5ea
0fe58e2
b8d1295
4ff7805
d357e1d
abc94bd
ec9f320
1e7bc49
ae860bd
0e79167
bb3dbd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,10 @@ mod tests; | |
pub use client::{HttpClient, HttpClientBuilder}; | ||
pub use hyper::http::{HeaderMap, HeaderValue}; | ||
pub use jsonrpsee_types as types; | ||
|
||
/// Default HTTP body for the client. | ||
pub type HttpBody = http_body_util::Full<hyper::body::Bytes>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this also be (maybe rename |
||
/// HTTP request with default body. | ||
pub type HttpRequest<T = HttpBody> = jsonrpsee_core::http_helpers::Request<T>; | ||
/// HTTP response with default body. | ||
pub type HttpResponse<T = HttpBody> = jsonrpsee_core::http_helpers::Response<T>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -461,6 +461,8 @@ fn assert_error_response(err: Error, exp: ErrorObjectOwned) { | |
|
||
#[tokio::test] | ||
async fn redirections() { | ||
init_logger(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: is this indended? |
||
|
||
let expected = "abc 123"; | ||
let server = WebSocketTestServer::with_hardcoded_response( | ||
"127.0.0.1:0".parse().unwrap(), | ||
|
@@ -471,7 +473,8 @@ async fn redirections() { | |
.unwrap(); | ||
|
||
let server_url = format!("ws://{}", server.local_addr()); | ||
let redirect_url = jsonrpsee_test_utils::mocks::ws_server_with_redirect(server_url); | ||
let redirect_url = | ||
jsonrpsee_test_utils::mocks::ws_server_with_redirect(server_url).with_default_timeout().await.unwrap(); | ||
|
||
// The client will first connect to a server that only performs re-directions and finally | ||
// redirect to another server to complete the handshake. | ||
|
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.
let's discuss whether we should support both crypto backends.
Rustls now supports both ring and aws-lc-rs but migrating to aws-lc-rs requires more dependencies such as cmake, NASM etc.
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'm happy with not exposing it initially, and then as a non-breaking change we can always expose it later or whatever if there's demand :)