Fix 411 Length Required on move_task API call
Google Tasks move endpoint requires Content-Length header even on POST requests with no body.
This commit is contained in:
@@ -441,7 +441,11 @@ impl ApiClient {
|
|||||||
req = req.query(&[("destinationTaskList", s)]);
|
req = req.query(&[("destinationTaskList", s)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
let resp = req.send().await.map_err(|e| ApiError::Network(e.to_string()))?;
|
let resp = req
|
||||||
|
.header(reqwest::header::CONTENT_LENGTH, "0")
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
.map_err(|e| ApiError::Network(e.to_string()))?;
|
||||||
|
|
||||||
if !resp.status().is_success() {
|
if !resp.status().is_success() {
|
||||||
let status = resp.status();
|
let status = resp.status();
|
||||||
|
|||||||
Reference in New Issue
Block a user