Add timeout of 60 seconds
This commit is contained in:
parent
550a8b05c4
commit
8732fee6c5
|
@ -27,6 +27,7 @@ pub async fn run(mut args: Skip<env::Args>) {
|
|||
env!("CARGO_PKG_NAME"),
|
||||
env!("CARGO_PKG_VERSION")
|
||||
))
|
||||
.timeout(60)
|
||||
.build()
|
||||
.unwrap();
|
||||
let text = client
|
||||
|
|
|
@ -2,7 +2,7 @@ mod structs;
|
|||
|
||||
use quick_xml::events::{BytesEnd, BytesStart, BytesText, Event};
|
||||
use quick_xml::{Reader, Writer};
|
||||
use reqwest::{Client, Url};
|
||||
use reqwest::{ClientBuilder, Url};
|
||||
use std::borrow::Cow;
|
||||
use std::env;
|
||||
use std::io::Cursor;
|
||||
|
@ -17,7 +17,7 @@ pub async fn run(mut args: Skip<env::Args>) {
|
|||
"mr" => structs::MR_QUERY,
|
||||
_ => panic!("Unknown type"),
|
||||
};
|
||||
let client = Client::new();
|
||||
let client = ClientBuilder::new().timeout(60).build().unwrap();
|
||||
let text = client
|
||||
.post("https://gitlab.com/api/graphql")
|
||||
.body(
|
||||
|
|
Loading…
Reference in New Issue