Skip to content

Commit

Permalink
[fix] hyperledger#4177: Fixed (get|set)_config 401 HTTP. Added Client…
Browse files Browse the repository at this point in the history
…'s headers to the requests

Signed-off-by: Stukalov-A-M <stukalov07@gmail.com>
Signed-off-by: Asem-Abdelhady <asemshawkey@gmail.com>
  • Loading branch information
Stukalov-A-M authored and Asem-Abdelhady committed Jan 22, 2024
1 parent 16dd611 commit ddffdd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@ impl Client {
.join(crate::config::torii::CONFIGURATION)
.expect("Valid URI"),
)
.headers(&self.headers)
.header(http::header::CONTENT_TYPE, APPLICATION_JSON)
.build()?
.send()?;
Expand All @@ -1116,6 +1117,7 @@ impl Client {
.join(crate::config::torii::CONFIGURATION)
.expect("Valid URI");
let resp = DefaultRequestBuilder::new(HttpMethod::POST, url)
.headers(&self.headers)
.header(http::header::CONTENT_TYPE, APPLICATION_JSON)
.body(body)
.build()?
Expand Down

0 comments on commit ddffdd4

Please sign in to comment.