Updated documentation in examples (#1219)
Documentation in examples recommends using `tokio 0.2` as dependency, while README.md recomends `tokio 0.1`. I've updated comments according to readme.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
// Short example of a POST request with form data.
|
// Short example of a POST request with form data.
|
||||||
//
|
//
|
||||||
|
// This is using the `tokio` runtime. You'll need the following dependency:
|
||||||
|
//
|
||||||
|
// `tokio = { version = "1", features = ["full"] }`
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// This is using the `tokio` runtime. You'll need the following dependency:
|
// This is using the `tokio` runtime. You'll need the following dependency:
|
||||||
//
|
//
|
||||||
// `tokio = { version = "0.2", features = ["macros"] }`
|
// `tokio = { version = "1", features = ["full"] }`
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), reqwest::Error> {
|
async fn main() -> Result<(), reqwest::Error> {
|
||||||
let echo_json: serde_json::Value = reqwest::Client::new()
|
let echo_json: serde_json::Value = reqwest::Client::new()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ struct Post {
|
|||||||
|
|
||||||
// This is using the `tokio` runtime. You'll need the following dependency:
|
// This is using the `tokio` runtime. You'll need the following dependency:
|
||||||
//
|
//
|
||||||
// `tokio = { version = "0.2", features = ["macros"] }`
|
// `tokio = { version = "1", features = ["full"] }`
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), reqwest::Error> {
|
async fn main() -> Result<(), reqwest::Error> {
|
||||||
let new_post = Post {
|
let new_post = Post {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// This is using the `tokio` runtime. You'll need the following dependency:
|
// This is using the `tokio` runtime. You'll need the following dependency:
|
||||||
//
|
//
|
||||||
// `tokio = { version = "0.2", features = ["macros"] }`
|
// `tokio = { version = "1", features = ["full"] }`
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), reqwest::Error> {
|
async fn main() -> Result<(), reqwest::Error> {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// This is using the `tokio` runtime. You'll need the following dependency:
|
// This is using the `tokio` runtime. You'll need the following dependency:
|
||||||
//
|
//
|
||||||
// `tokio = { version = "0.2", features = ["macros"] }`
|
// `tokio = { version = "1", features = ["full"] }`
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), reqwest::Error> {
|
async fn main() -> Result<(), reqwest::Error> {
|
||||||
// Make sure you are running tor and this is your socks port
|
// Make sure you are running tor and this is your socks port
|
||||||
|
|||||||
Reference in New Issue
Block a user