Struct ruroonga_client::HTTPRequest [] [src]

pub struct HTTPRequest {
    // some fields omitted
}

Methods

impl HTTPRequest
[src]

fn new() -> HTTPRequest

Create a HTTP client.

fn authenticate<T>(self, user: T, password: T) -> HTTPRequest where T: AsRef<str>

Set authentication information.

Note that this method also sets auth: true to use basic authentication.

And this method uses builder pattern and returns self.

Examples

extern crate ruroonga_client as groonga;

groonga::HTTPRequest::new()
  .authenticate("user", "password");

fn get<T>(&mut self, url: T) -> Result<ResponseHyperError> where T: AsRef<str>

Creating an outgoing request with HTTP.

fn load<T>(&mut self, url: T, body: String) -> Result<ResponseHyperError> where T: AsRef<str>

Creating an loading data request via POST.

fn receive(&mut self, res: &mut Response) -> Result<StringError>

Read the Response.

Trait Implementations

impl Default for HTTPRequest
[src]

fn default() -> HTTPRequest

Returns the "default value" for a type. Read more