mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Update to reqwest 0.11.10
This commit is contained in:
parent
57005c4fd5
commit
eaac539087
4 changed files with 145 additions and 778 deletions
909
Cargo.lock
generated
909
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -75,7 +75,7 @@ maplit = "1.0.2"
|
||||||
notify = "4.0.17"
|
notify = "4.0.17"
|
||||||
opener = "0.5.0"
|
opener = "0.5.0"
|
||||||
regex = "1.5.4"
|
regex = "1.5.4"
|
||||||
reqwest = "0.9.24"
|
reqwest = { version = "0.11.10", features = ["blocking", "json"] }
|
||||||
ritz = "0.1.0"
|
ritz = "0.1.0"
|
||||||
rlua = "0.17.1"
|
rlua = "0.17.1"
|
||||||
roblox_install = "1.0.0"
|
roblox_install = "1.0.0"
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ fn do_upload(buffer: Vec<u8>, asset_id: u64, cookie: &str) -> anyhow::Result<()>
|
||||||
asset_id
|
asset_id
|
||||||
);
|
);
|
||||||
|
|
||||||
let client = reqwest::Client::new();
|
let client = reqwest::blocking::Client::new();
|
||||||
|
|
||||||
let build_request = move || {
|
let build_request = move || {
|
||||||
client
|
client
|
||||||
|
|
@ -172,10 +172,10 @@ fn do_upload_open_cloud(
|
||||||
universe_id, asset_id
|
universe_id, asset_id
|
||||||
);
|
);
|
||||||
|
|
||||||
let client = reqwest::Client::new();
|
let client = reqwest::blocking::Client::new();
|
||||||
|
|
||||||
log::debug!("Uploading to Roblox...");
|
log::debug!("Uploading to Roblox...");
|
||||||
let mut response = client
|
let response = client
|
||||||
.post(&url)
|
.post(&url)
|
||||||
.header("x-api-key", api_key)
|
.header("x-api-key", api_key)
|
||||||
.header(CONTENT_TYPE, "application/xml")
|
.header(CONTENT_TYPE, "application/xml")
|
||||||
|
|
|
||||||
|
|
@ -141,14 +141,14 @@ impl TestServeSession {
|
||||||
|
|
||||||
pub fn get_api_rojo(&self) -> Result<ServerInfoResponse, reqwest::Error> {
|
pub fn get_api_rojo(&self) -> Result<ServerInfoResponse, reqwest::Error> {
|
||||||
let url = format!("http://localhost:{}/api/rojo", self.port);
|
let url = format!("http://localhost:{}/api/rojo", self.port);
|
||||||
let body = reqwest::get(&url)?.text()?;
|
let body = reqwest::blocking::get(&url)?.text()?;
|
||||||
|
|
||||||
Ok(serde_json::from_str(&body).expect("Server returned malformed response"))
|
Ok(serde_json::from_str(&body).expect("Server returned malformed response"))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_api_read(&self, id: Ref) -> Result<ReadResponse, reqwest::Error> {
|
pub fn get_api_read(&self, id: Ref) -> Result<ReadResponse, reqwest::Error> {
|
||||||
let url = format!("http://localhost:{}/api/read/{}", self.port, id);
|
let url = format!("http://localhost:{}/api/read/{}", self.port, id);
|
||||||
let body = reqwest::get(&url)?.text()?;
|
let body = reqwest::blocking::get(&url)?.text()?;
|
||||||
|
|
||||||
Ok(serde_json::from_str(&body).expect("Server returned malformed response"))
|
Ok(serde_json::from_str(&body).expect("Server returned malformed response"))
|
||||||
}
|
}
|
||||||
|
|
@ -159,7 +159,7 @@ impl TestServeSession {
|
||||||
) -> Result<SubscribeResponse<'static>, reqwest::Error> {
|
) -> Result<SubscribeResponse<'static>, reqwest::Error> {
|
||||||
let url = format!("http://localhost:{}/api/subscribe/{}", self.port, cursor);
|
let url = format!("http://localhost:{}/api/subscribe/{}", self.port, cursor);
|
||||||
|
|
||||||
reqwest::get(&url)?.json()
|
reqwest::blocking::get(&url)?.json()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue