Struct gerritlib::call::CallRequest
[−]
[src]
pub struct CallRequest<'a> { /* fields omitted */ }Represents a HTTP request
For usage we fill the CallRequest with an header and a body. Later we call via handler the
gerrit server.
Methods
impl<'a> CallRequest<'a>[src]
fn new(handle: RefMut<'a, Easy>,
method: CallMethod,
url: String)
-> GGRResult<CallRequest<'a>>
method: CallMethod,
url: String)
-> GGRResult<CallRequest<'a>>
creates new instance of [CallRequest] with a curl-handler, the HTTP method and the url
endpoint
fn send(self) -> GGRResult<CallResponse>
Does the send function.
NOTICE: The first 4 characters are cutted from the returned content. We want only json data which has a prevention against XSSI attacks. More here: https://gerrit-documentation.storage.googleapis.com/Documentation/2.12.3/rest-api.html#output