1 stable release
1.0.0 | Aug 18, 2019 |
---|
#13 in #dbg
8KB
95 lines
dbg_as_curl
A simple helper to get a cURL command line for your reqwest
calls:
let client = reqwest::Client::new();
dbg_as_curl!(
client.get("https://example.org").bearer_auth("foo")
).send()?;
It works the same way as the standard dbg!
macro, but will print a command line that you can copy&paste to execute a reqwest
call yourself:
[tests/tests.rs:4] client.get("http://example.org").bearer_auth("foo") = curl --header 'authorization: Bearer foo' 'http://example.org/'
Dependencies
~22MB
~452K SLoC