Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "paper-mc"
edition = "2021"
version = "0.1.0"
version = "0.1.1"
description = "PaperMC client, generated from the OpenAPI spec."
homepage = "https://github.com/libninjacom/paper-mc-rs"
documentation = "https://docs.rs/paper-mc"
Expand Down
4 changes: 2 additions & 2 deletions src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub struct DownloadRequest<'a> {
pub download: String,
}
impl<'a> DownloadRequest<'a> {
pub async fn send(self) -> anyhow::Result<serde_json::Value> {
pub async fn send(self) -> anyhow::Result<httpclient::Response> {
let mut r = self
.client
.client
Expand All @@ -155,7 +155,7 @@ impl<'a> DownloadRequest<'a> {
);
let res = r.send().await.unwrap().error_for_status();
match res {
Ok(res) => res.json().await.map_err(|e| anyhow::anyhow!("{:?}", e)),
Ok(res) => Ok(res),
Err(res) => {
let text = res.text().await.map_err(|e| anyhow::anyhow!("{:?}", e))?;
Err(anyhow::anyhow!("{:?}", text))
Expand Down