logout
POST
/api/v1/auth/logout
const url = 'https://example.com/api/v1/auth/logout';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use reqwest;
#[tokio::main]pub async fn main() { let url = "https://example.com/api/v1/auth/logout";
let client = reqwest::Client::new(); let response = client.post(url) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://example.com/api/v1/auth/logoutResponses
Section titled “Responses”Logged out, cookies cleared