pub fn load_track(
    address: SocketAddr,
    identifier: impl AsRef<str>,
    authorization: impl AsRef<str>,
) -> Result<Request<&'static [u8]>, HttpError> {
    let identifier =
        percent_encoding::percent_encode(identifier.as_ref().as_bytes(), NON_ALPHANUMERIC);
    let url = format!("http://{}/loadtracks?identifier={}", address, identifier);

    let mut req = Request::get(url);

    let auth_value = HeaderValue::from_str(authorization.as_ref())?;
    req = req.header(AUTHORIZATION, auth_value);

    req.body(b"")
}
/// Get a list of tracks that match an identifier.
///
/// The response will include a body which can be deserialized into a
/// [`LoadedTracks`].
Get a list of tracks that match an identifier.
The response will include a body which can be deserialized into a
[`LoadedTracks`].
Get a list of tracks that match an identifier . The response will include a body which can be deserialized into a [ ` LoadedTracks ` ] .
pub fn load_track(
    address: SocketAddr,
    identifier: impl AsRef<str>,
    authorization: impl AsRef<str>,
) -> Result<Request<&'static [u8]>, HttpError> {
    let identifier =
        percent_encoding::percent_encode(identifier.as_ref().as_bytes(), NON_ALPHANUMERIC);
    let url = format!("http://{}/loadtracks?identifier={}", address, identifier);
    let mut req = Request::get(url);
    let auth_value = HeaderValue::from_str(authorization.as_ref())?;
    req = req.header(AUTHORIZATION, auth_value);
    req.body(b"")
}
pub fn load_track ( address : SocketAddr , identifier : impl AsRef < str > , authorization : impl AsRef < str > , ) -> Result < Request < & ' static [ u8 ] > , HttpError > { let identifier = percent_encoding :: percent_encode ( identifier . as_ref ( ) . as_bytes ( ) , NON_ALPHANUMERIC ) ; let url = format ! ( " " address identifier ) ; let mut req = Request :: get ( url ) ; let auth_value = HeaderValue :: from_str ( authorization . as_ref ( ) ) ? ; req = req . header ( AUTHORIZATION , auth_value ) ; req . body ( b" " ) }
Get a list of tracks that match an identifier.
Get a list of tracks that match an identifier .
address
SocketAddr
identifier
impl AsRef<str>
authorization
impl AsRef<str>