Skip to content

Commit

Permalink
fix: application/json content headers not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Schleich committed May 28, 2024
1 parent ef0d35f commit 6cecd9f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/api/buckets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
use snafu::ResultExt;

use crate::models::{Buckets, PostBucketRequest};
use crate::{Client, Http, RequestError, ReqwestProcessing, Serializing};
use crate::{Client, Http, RequestError, ReqwestProcessing};

impl Client {
/// List all buckets matching specified parameters
Expand Down Expand Up @@ -47,10 +47,7 @@ impl Client {

let response = self
.request(Method::POST, &create_bucket_url)
.body(
serde_json::to_string(&post_bucket_request.unwrap_or_default())
.context(Serializing)?,
)
.json(&post_bucket_request.unwrap_or_default())
.send()
.await
.context(ReqwestProcessing)?;
Expand Down

0 comments on commit 6cecd9f

Please sign in to comment.