Skip to content

Commit

Permalink
Merge pull request #61 from Charles-Schleich/fix/content_headers
Browse files Browse the repository at this point in the history
fix: application/json content headers not being set
  • Loading branch information
Charles-Schleich authored Jul 5, 2024
2 parents 2b9ce41 + 6cecd9f commit c879ce1
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 c879ce1

Please sign in to comment.