v0.1
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s

This commit is contained in:
2023-10-20 23:31:16 +09:00
parent 430b5977d8
commit 7b03adda1f
53 changed files with 3466 additions and 1 deletions

25
src/token.rs Normal file
View File

@ -0,0 +1,25 @@
extern crate reqwest;
use std::collections::HashMap;
pub async fn post_request(handle: String, pass: String, host: String) -> String {
let url = "https://".to_owned()
+ &host.to_string()
+ &"/xrpc/com.atproto.server.createSession".to_string();
let mut map = HashMap::new();
map.insert("identifier", &handle);
map.insert("password", &pass);
let client = reqwest::Client::new();
let res = client
.post(url)
.json(&map)
.send()
.await
.unwrap()
.text()
.await
.unwrap();
return res;
}