curl-rust
libcurl bindings for Rust
NOTE: This library's master branch is not currently published on crates.io
and is slated to be the 0.3 release of the curl crate once Rust 1.9
is release.
Quick Start
extern crate curl;
use ;
use Easy;
// Print a web page onto stdout
extern crate curl;
use Easy;
// Capture output into a local `Vec`.
Post / Put requests
The put and post methods on Easy can configure the method of the HTTP
request, and then read_function can be used to specify how data is filled in.
This interface works particularly well with types that implement Read.
extern crate curl;
use Read;
use Easy;
Custom headers
Custom headers can be specified as part of the request:
extern crate curl;
use ;
Keep alive
The handle can be re-used across multiple requests. Curl will attempt to keep the connections alive.
extern crate curl;
use Easy;
Multiple requests
The libcurl library provides support for sending multiple requests
simultaneously through the "multi" interface. This is currently bound in the
multi module of this crate and provides the ability to execute multiple
transfers simultaneously. For more information, see that module.
Version Support
The bindings have been developed using curl version 7.24.0. They should work with any newer version of curl and possibly with older versions, but this has not been tested.
License
The curl-rust crate is licensed under the MIT license, see LICENSE for more
details.