Skip to main content

upload_request

Macro upload_request 

Source
macro_rules! upload_request {
    {
        $(
            $(#[$m:meta])*
            pub struct $t:ident (
                // Does this request require anonymity?
                // This should be a variant of AnonymizedRequest.
                $anonymity:ident,
                // To what URI at the server should the document be posted?
                // This should begin with "/tor">
                $uri:expr,
                // Total maximum length of the _response_ that we'll accept.
                // If the response is larger than this, we'll abort the request.
                //
                // Note that expected response body for a POST is typically _empty_,
                // but this needs to be nonzero in order to account for
                // the status line and headers.
                $max_response_len:expr
            )
        );*
        $(;)?
    } => { ... };
}
Expand description

Define a request type for uploading a document.