Struct libgerrit::call::Call
[−]
[src]
pub struct Call { /* fields omitted */ }
Interface to talk with a http server
Methods
impl Call
[src]
fn new(url: &Url) -> Call
[src]
create a new call object with url as endpoint
fn set_url_query(&mut self, q: Option<&str>)
[src]
change url objects query information
fn get_base(&self) -> &Url
[src]
return reference t base url object
fn request<S: Serialize>(
&self,
method: CallMethod,
path: &str,
body: Option<&S>
) -> GGRResult<CallResponse>
[src]
&self,
method: CallMethod,
path: &str,
body: Option<&S>
) -> GGRResult<CallResponse>
call the do_request function two times. One with digest and the other with basic http authentication methods. The first success returnes a CallResponse
fn get(&self, path: &str) -> GGRResult<CallResponse>
[src]
Convenience method that performs a GET
request.
fn delete(&self, path: &str) -> GGRResult<CallResponse>
[src]
Convenience method that performs a DELETE
request.
fn post<S: Serialize>(&self, path: &str, body: &S) -> GGRResult<CallResponse>
[src]
Convenience method that performs a POST
request with JSON data.
fn put<S: Serialize>(&self, path: &str, body: &S) -> GGRResult<CallResponse>
[src]
Convenience method that performs a PUT
request with JSON data.