Replace custom hyper client with reqwest (#593)

* [DNM] Replace custom hyper client with reqwest

* Fix runtime error
This commit is contained in:
Quentin Le Sceller
2021-05-04 11:13:38 -04:00
committed by GitHub
parent bdc5bd748a
commit 83fd8ffc86
11 changed files with 297 additions and 192 deletions
Generated
+202 -55
View File
@@ -166,28 +166,6 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
[[package]]
name = "async-socks5"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "575663f6d00adcfc4289d3f0825f49856380e062c030e799a2f9f4a275d842d6"
dependencies = [
"async-trait",
"thiserror",
"tokio",
]
[[package]]
name = "async-trait"
version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92"
dependencies = [
"proc-macro2 1.0.19",
"quote 1.0.7",
"syn 1.0.38",
]
[[package]]
name = "atty"
version = "0.2.14"
@@ -442,6 +420,16 @@ version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]]
name = "bytes"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
dependencies = [
"byteorder",
"iovec",
]
[[package]]
name = "bytes"
version = "0.5.6"
@@ -915,6 +903,15 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "encoding_rs"
version = "0.8.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065"
dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "enum_primitive"
version = "0.1.1"
@@ -1186,7 +1183,7 @@ name = "grin_api"
version = "5.1.0-alpha.1"
source = "git+https://github.com/mimblewimble/grin?branch=master#f6ec77a592de04fcc4a78127822932ec7e18525c"
dependencies = [
"bytes",
"bytes 0.5.6",
"easy-jsonrpc-mw",
"failure",
"failure_derive",
@@ -1199,18 +1196,18 @@ dependencies = [
"grin_util",
"http",
"hyper",
"hyper-rustls",
"hyper-rustls 0.20.0",
"hyper-timeout",
"lazy_static",
"log",
"regex",
"ring",
"rustls",
"rustls 0.17.0",
"serde",
"serde_derive",
"serde_json",
"tokio",
"tokio-rustls",
"tokio-rustls 0.13.1",
"url",
]
@@ -1245,7 +1242,7 @@ source = "git+https://github.com/mimblewimble/grin?branch=master#f6ec77a592de04f
dependencies = [
"blake2-rfc",
"byteorder",
"bytes",
"bytes 0.5.6",
"chrono",
"croaring",
"enum_primitive",
@@ -1293,7 +1290,7 @@ version = "5.1.0-alpha.1"
source = "git+https://github.com/mimblewimble/grin?branch=master#f6ec77a592de04fcc4a78127822932ec7e18525c"
dependencies = [
"bitflags 1.2.1",
"bytes",
"bytes 0.5.6",
"chrono",
"enum_primitive",
"grin_chain",
@@ -1496,16 +1493,12 @@ dependencies = [
"grin_wallet_config",
"grin_wallet_libwallet",
"grin_wallet_util",
"http",
"hyper",
"hyper-rustls",
"hyper-socks2-mw",
"hyper-timeout",
"lazy_static",
"log",
"rand 0.6.5",
"regex",
"remove_dir_all 0.7.0",
"reqwest",
"ring",
"serde",
"serde_derive",
@@ -1574,7 +1567,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53"
dependencies = [
"bytes",
"bytes 0.5.6",
"fnv",
"futures-core",
"futures-sink",
@@ -1650,7 +1643,7 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9"
dependencies = [
"bytes",
"bytes 0.5.6",
"fnv",
"itoa",
]
@@ -1661,7 +1654,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [
"bytes",
"bytes 0.5.6",
"http",
]
@@ -1692,7 +1685,7 @@ version = "0.13.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb"
dependencies = [
"bytes",
"bytes 0.5.6",
"futures-channel",
"futures-core",
"futures-util",
@@ -1716,31 +1709,32 @@ version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08"
dependencies = [
"bytes",
"bytes 0.5.6",
"ct-logs",
"futures-util",
"hyper",
"log",
"rustls",
"rustls 0.17.0",
"rustls-native-certs",
"tokio",
"tokio-rustls",
"tokio-rustls 0.13.1",
"webpki",
]
[[package]]
name = "hyper-socks2-mw"
version = "0.4.4"
name = "hyper-rustls"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d7267805b50714db2ebe2904b1e70158ba6ba8eafdaf7c9d7735aca3273c4f8"
checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6"
dependencies = [
"async-socks5",
"futures 0.3.5",
"http",
"bytes 0.5.6",
"futures-util",
"hyper",
"hyper-tls",
"thiserror",
"log",
"rustls 0.18.1",
"tokio",
"tokio-rustls 0.14.1",
"webpki",
]
[[package]]
@@ -1749,7 +1743,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d1f9b0b8258e3ef8f45928021d3ef14096c2b93b99e4b8cfcabf1f58ec84b0a"
dependencies = [
"bytes",
"bytes 0.5.6",
"hyper",
"tokio",
"tokio-io-timeout",
@@ -1761,7 +1755,7 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed"
dependencies = [
"bytes",
"bytes 0.5.6",
"hyper",
"native-tls",
"tokio",
@@ -1798,6 +1792,12 @@ dependencies = [
"libc",
]
[[package]]
name = "ipnet"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
[[package]]
name = "itoa"
version = "0.4.6"
@@ -2045,6 +2045,22 @@ dependencies = [
"autocfg 1.0.0",
]
[[package]]
name = "mime"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
[[package]]
name = "mime_guess"
version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212"
dependencies = [
"mime",
"unicase",
]
[[package]]
name = "miniz_oxide"
version = "0.4.0"
@@ -2886,6 +2902,46 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "reqwest"
version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e"
dependencies = [
"base64 0.12.3",
"bytes 0.5.6",
"encoding_rs",
"futures-core",
"futures-util",
"http",
"http-body",
"hyper",
"hyper-rustls 0.21.0",
"hyper-tls",
"ipnet",
"js-sys",
"lazy_static",
"log",
"mime",
"mime_guess",
"native-tls",
"percent-encoding",
"pin-project-lite",
"rustls 0.18.1",
"serde",
"serde_urlencoded",
"tokio",
"tokio-rustls 0.14.1",
"tokio-socks",
"tokio-tls",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"webpki-roots",
"winreg",
]
[[package]]
name = "ring"
version = "0.16.15"
@@ -2965,6 +3021,19 @@ dependencies = [
"webpki",
]
[[package]]
name = "rustls"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81"
dependencies = [
"base64 0.12.3",
"log",
"ring",
"sct",
"webpki",
]
[[package]]
name = "rustls-native-certs"
version = "0.3.0"
@@ -2972,7 +3041,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5"
dependencies = [
"openssl-probe",
"rustls",
"rustls 0.17.0",
"schannel",
"security-framework",
]
@@ -3154,6 +3223,18 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_urlencoded"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97"
dependencies = [
"dtoa",
"itoa",
"serde",
"url",
]
[[package]]
name = "serde_yaml"
version = "0.8.14"
@@ -3525,7 +3606,7 @@ version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd"
dependencies = [
"bytes",
"bytes 0.5.6",
"fnv",
"futures-core",
"iovec",
@@ -3549,7 +3630,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9390a43272c8a6ac912ed1d1e2b6abeafd5047e05530a2fa304deee041a06215"
dependencies = [
"bytes",
"bytes 0.5.6",
"tokio",
]
@@ -3571,11 +3652,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "15cb62a0d2770787abc96e99c1cd98fcf17f94959f3af63ca85bdfb203f051b4"
dependencies = [
"futures-core",
"rustls",
"rustls 0.17.0",
"tokio",
"webpki",
]
[[package]]
name = "tokio-rustls"
version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a"
dependencies = [
"futures-core",
"rustls 0.18.1",
"tokio",
"webpki",
]
[[package]]
name = "tokio-socks"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1997788a0e25e09300e44680ba1ef9d44d6f634a883641f80109e8b59c928daf"
dependencies = [
"bytes 0.4.12",
"either",
"futures 0.3.5",
"thiserror",
"tokio",
]
[[package]]
name = "tokio-tls"
version = "0.3.1"
@@ -3592,7 +3698,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"
dependencies = [
"bytes",
"bytes 0.5.6",
"futures-core",
"futures-sink",
"log",
@@ -3662,6 +3768,15 @@ version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
[[package]]
name = "unicase"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
dependencies = [
"version_check",
]
[[package]]
name = "unicode-bidi"
version = "0.3.4"
@@ -3814,6 +3929,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c"
dependencies = [
"cfg-if 0.1.10",
"serde",
"serde_json",
"wasm-bindgen-macro",
]
@@ -3832,6 +3949,18 @@ dependencies = [
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699"
dependencies = [
"cfg-if 0.1.10",
"js-sys",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.67"
@@ -3881,6 +4010,15 @@ dependencies = [
"untrusted",
]
[[package]]
name = "webpki-roots"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739"
dependencies = [
"webpki",
]
[[package]]
name = "which"
version = "3.1.1"
@@ -3933,6 +4071,15 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "winreg"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "ws2_32-sys"
version = "0.2.1"