pub async fn api_no_auth_with_credentials<T, E, Payload>(
    endpoint: &str,
    method: Method,
    data: Option<Payload>,
) -> Result<T, E>
where
    T: DeserializeOwned + Serialize,
    E: DeserializeOwned + Serialize,
    Payload: Serialize,
{
    let (resp, status) = api_no_auth_with_credentials_status(endpoint, method, data).await;

    side_effect_status_code(status);

    resp
}
//used in cases where we have the cookie but not the token
//really just used for login and registration, to get the token via oauth flow
used in cases where we have the cookie but not the token
really just used for login and registration, to get the token via oauth flow
used in cases where we have the cookie but not the token really just used for login and registration to get the token via oauth flow
pub async fn api_no_auth_with_credentials<T, E, Payload>(
    endpoint: &str,
    method: Method,
    data: Option<Payload>,
) -> Result<T, E>
where
    T: DeserializeOwned + Serialize,
    E: DeserializeOwned + Serialize,
    Payload: Serialize,
{
    let (resp, status) = api_no_auth_with_credentials_status(endpoint, method, data).await;
    side_effect_status_code(status);
    resp
}
pub async fn api_no_auth_with_credentials < T , E , Payload > ( endpoint : & str , method : Method , data : Option < Payload > , ) -> Result < T , E > where T : DeserializeOwned + Serialize , E : DeserializeOwned + Serialize , Payload : Serialize , { let ( resp , status ) = api_no_auth_with_credentials_status ( endpoint , method , data ) . await ; side_effect_status_code ( status ) ; resp }
used in cases where we have the cookie but not the token
really just used for login and registration, to get the token via oauth flow
used in cases where we have the cookie but not the token really just used for login and registration to get the token via oauth flow
endpoint
&str
method
Method
data
Option<Payload>
endpoint
&str
method
Method
data
Option<Payload>