You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i used multipart to send a tweet i'd get 400 error saying {\"errors\":[{\"message\":\"Requests with bodies must have content-type of application/json.\"}],\"title\":\"Invalid Request\",\"detail\":\"One or more parameters to your request was invalid.\",\"type\":\"https://api.twitter.com/2/problems/invalid-request\"}
// this gave me the 400
let content = multipart::Form::new()
.text("status", "Hello, Twitter!");
.multipart(content)
A work around i did was
let tweet_data = json!({"text": "hello"}).to_string();
.header("Content-Type", "application/json")
.body(tweet_data)
just posting here in case someone run into this same issue.
The text was updated successfully, but these errors were encountered:
When i used multipart to send a tweet i'd get 400 error saying
{\"errors\":[{\"message\":\"Requests with bodies must have content-type of application/json.\"}],\"title\":\"Invalid Request\",\"detail\":\"One or more parameters to your request was invalid.\",\"type\":\"https://api.twitter.com/2/problems/invalid-request\"}
A work around i did was
just posting here in case someone run into this same issue.
The text was updated successfully, but these errors were encountered: