Skip to content

Instantly share code, notes, and snippets.

@chrissharkey
Created May 19, 2015 19:28
Show Gist options
  • Save chrissharkey/8c83249f28f1acea06ae to your computer and use it in GitHub Desktop.
Save chrissharkey/8c83249f28f1acea06ae to your computer and use it in GitHub Desktop.
let mut client = Client::new();
let mut req = client.post("http://localhost:3001");
let bytes = l.clone();
let request_body = Body::BufBody(bytes.as_bytes(), l.len());
req.body(request_body);
let mut res = req.header(Connection::close()).send().unwrap();
let mut view_keys = String::new();
res.read_to_string(&mut view_keys).unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment