MCPcopy Index your code
hub / github.com/Rust-Web-Development/code / login

Function login

ch_11/integration-tests/src/main.rs:125–140  ·  view source on GitHub ↗
(user: User)

Source from the content-addressed store, hash-verified

123}
124
125async fn login(user: User) -> Token {
126 let client = reqwest::Client::new();
127 let res = client
128 .post("http://localhost:3030/login")
129 .json(&user)
130 .send()
131 .await
132 .unwrap();
133
134 assert_eq!(res.status(), 200);
135
136 res
137 .json::<Token>()
138 .await
139 .unwrap()
140}
141
142async fn post_question(token: Token) {
143 let q = Question {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected