fn build_get(srv: &mut TestServer, uri: &str, token: Option<&str>) -> ClientRequest {
    let mut request = srv.get();
    let mut request = request.uri(srv.url(uri));

    match token {
        Some(t) => add_token_to_request(&mut request, t),
        None => (),
    }

    request.finish().unwrap()
}
/// Builds a common get request, appending an auth token if provided.
/// The url for the route will hit the endpoint specified in uri
///
/// # Arguments
///
/// * `srv` - An instance of a TestServer
/// * `uri` - Endpoint to hit
/// * `token` - An optional authorization token
Builds a common get request, appending an auth token if provided.
The url for the route will hit the endpoint specified in uri
Builds a common get request appending an auth token if provided . The url for the route will hit the endpoint specified in uri
fn build_get(srv: &mut TestServer, uri: &str, token: Option<&str>) -> ClientRequest {
    let mut request = srv.get();
    let mut request = request.uri(srv.url(uri));
    match token {
        Some(t) => add_token_to_request(&mut request, t),
        None => (),
    }
    request.finish().unwrap()
}
fn build_get ( srv : & mut TestServer , uri : & str , token : Option < & str > ) -> ClientRequest { let mut request = srv . get ( ) ; let mut request = request . uri ( srv . url ( uri ) ) ; match token { Some ( t ) => add_token_to_request ( & mut request , t ) , None => ( ) , } request . finish ( ) . unwrap ( ) }
Builds a common get request, appending an auth token if provided.
Builds a common get request appending an auth token if provided .
srv
&mut TestServer
uri
&str
token
Option<&str>
srv
&mut TestServer
uri
&str
token
Option<&str>