Created
September 11, 2020 10:01
-
-
Save michielmulders/d61117531b2d9b3b2e933233dcd00116 to your computer and use it in GitHub Desktop.
Sync POST request example Ureq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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