Macro pink::http_put

source ·
macro_rules! http_put {
    ($url: expr, $data: expr, $headers: expr) => { ... };
    ($url: expr, $data: expr) => { ... };
}
Expand description

Make a simple HTTP PUT request

§Arguments

  • url: The destination URL
  • data: The payload to PUT
  • headers: The headers to send with the request

§Examples

use pink::http_put;
let response = http_put!("https://example.com/", b"Hello, world!");
assert_eq!(response.status_code, 200);