File tree Expand file tree Collapse file tree 2 files changed +22
-15
lines changed Expand file tree Collapse file tree 2 files changed +22
-15
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ use http_client:: HttpClient ;
2
+ use http_types:: { Method , Request } ;
3
+
4
+ #[ cfg( any( feature = "h1_client" , feature = "docs" ) ) ]
5
+ use http_client:: h1:: H1Client as Client ;
6
+ #[ cfg( all( feature = "hyper_client" , not( feature = "docs" ) ) ) ]
7
+ use http_client:: hyper:: HyperClient as Client ;
8
+ #[ cfg( all( feature = "curl_client" , not( feature = "docs" ) ) ) ]
9
+ use http_client:: isahc:: IsahcClient as Client ;
10
+ #[ cfg( all( feature = "wasm_client" , not( feature = "docs" ) ) ) ]
11
+ use http_client:: wasm:: WasmClient as Client ;
12
+
13
+ #[ async_std:: main]
14
+ async fn main ( ) {
15
+ let client = Client :: new ( ) ;
16
+
17
+ let req = Request :: new ( Method :: Get , "http://example.org" ) ;
18
+
19
+ client. send ( req) . await . unwrap ( ) ;
20
+
21
+ dbg ! ( client) ;
22
+ }
You can’t perform that action at this time.
0 commit comments