I want to convert curl command into Rust code by using reqwest crate. The curl command I am using is:
curl \
--cookie ~/auth/cookie \
--cookie-jar ~/auth/cookie \
-H 'Content-Type: application/json' \
-d '{"EnvironmentName": "MyEnv"}' \
-sS \
https://xxxxx.xxxx.com
The ~/auth/cookie cookie file uses Netscape format, and it is recognized by curl command.
When coding my Rust source, I find that it seems no such load_netscape() function in reqwest crate helping loading the cookie file.
I find this https://crates.io/crates/reqwest_cookie_store crate, and it uses json file as cookie file.
Can anyone tell me how to mimic the behavior the curl command doing?