mirror of
https://github.com/foss42/apidash.git
synced 2025-05-28 12:18:06 +08:00
codegen(reqwest): small fix for payload and null headerList
This commit is contained in:
@ -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());
|
||||
|
Reference in New Issue
Block a user