Skip to content

Commit

Permalink
fix: bug in sending bach fragments content type
Browse files Browse the repository at this point in the history
  • Loading branch information
kukkok3 committed Oct 5, 2023
1 parent d2e2ad0 commit 374c3e8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ impl RawRest {
headers
}

fn construct_headers_json(&self) -> HeaderMap {
let mut headers = HeaderMap::new();
headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
headers
}

fn post(
&self,
path: &str,
Expand Down Expand Up @@ -310,7 +316,7 @@ impl RawRest {
) -> Result<Response, reqwest::Error> {
self.client
.post(self.path(ApiVersion::V1, "fragments"))
.headers(self.construct_headers())
.headers(self.construct_headers_json())
.json(&FragmentsBatch {
fail_fast,
fragments,
Expand Down

0 comments on commit 374c3e8

Please sign in to comment.