codegen(reqwest): small fix for payload and null headerList

This commit is contained in:
Tanish2002
2024-02-25 05:20:54 +05:30
parent 838cd5f1cc
commit 7a6bb125c9
2 changed files with 11 additions and 11 deletions

View File

@ -312,13 +312,14 @@ void main() {
let client = reqwest::blocking::Client::new();
let url = "https://api.foss42.com/case/lower";
let payload = b"{
let payload = r#"{
"text": "I LOVE Flutter"
}";
}"#;
let response = client
.post(url)
.body(payload.to_vec())
.header("content-type", "text/plain")
.body(payload)
.send()?;
println!("Status Code: {}", response.status());