[rust] Fix content-type in templates (#14702)

This commit is contained in:
John Vandenberg 2023-02-16 17:54:02 +08:00 committed by GitHub
parent 12e76ec14f
commit 11d9d4346e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -198,7 +198,7 @@ impl Request {
let req_headers = req_builder.headers_mut().unwrap();
let request_result = if self.form_params.len() > 0 {
req_headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/ x-www-form-urlencoded"));
req_headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/x-www-form-urlencoded"));
let mut enc = ::url::form_urlencoded::Serializer::new("".to_owned());
for (k, v) in self.form_params {
enc.append_pair(&k, &v);

View File

@ -198,7 +198,7 @@ impl Request {
let req_headers = req_builder.headers_mut().unwrap();
let request_result = if self.form_params.len() > 0 {
req_headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/ x-www-form-urlencoded"));
req_headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/x-www-form-urlencoded"));
let mut enc = ::url::form_urlencoded::Serializer::new("".to_owned());
for (k, v) in self.form_params {
enc.append_pair(&k, &v);