mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
Set Content-Type in API client (#2680)
This commit is contained in:
parent
7678aceddf
commit
45d5686310
1 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,7 @@ use crate::util::to_base64;
|
||||||
use failure::{Fail, ResultExt};
|
use failure::{Fail, ResultExt};
|
||||||
use futures::future::{err, ok, Either};
|
use futures::future::{err, ok, Either};
|
||||||
use http::uri::{InvalidUri, Uri};
|
use http::uri::{InvalidUri, Uri};
|
||||||
use hyper::header::{ACCEPT, AUTHORIZATION, USER_AGENT};
|
use hyper::header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE, USER_AGENT};
|
||||||
use hyper::rt::{Future, Stream};
|
use hyper::rt::{Future, Stream};
|
||||||
use hyper::{Body, Client, Request};
|
use hyper::{Body, Client, Request};
|
||||||
use hyper_rustls;
|
use hyper_rustls;
|
||||||
|
@ -147,6 +147,7 @@ fn build_request<'a>(
|
||||||
.uri(uri)
|
.uri(uri)
|
||||||
.header(USER_AGENT, "grin-client")
|
.header(USER_AGENT, "grin-client")
|
||||||
.header(ACCEPT, "application/json")
|
.header(ACCEPT, "application/json")
|
||||||
|
.header(CONTENT_TYPE, "application/json")
|
||||||
.body(match body {
|
.body(match body {
|
||||||
None => Body::empty(),
|
None => Body::empty(),
|
||||||
Some(json) => json.into(),
|
Some(json) => json.into(),
|
||||||
|
|
Loading…
Reference in a new issue