Skip to content

Instantly share code, notes, and snippets.

@michielmulders
Created September 11, 2020 10:01
Show Gist options
  • Select an option

  • Save michielmulders/d61117531b2d9b3b2e933233dcd00116 to your computer and use it in GitHub Desktop.

Select an option

Save michielmulders/d61117531b2d9b3b2e933233dcd00116 to your computer and use it in GitHub Desktop.
Sync POST request example Ureq
let resp = ureq::post("https://myapi.example.com/ingest")
.set("X-My-Header", "Secret")
.send_json(serde_json::json!({
"name": "martin",
"rust": true
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment