· 6 years ago · Mar 09, 2020, 10:38 AM
1if (ImGui::Button(u8"Login", ImVec2(250, 45)))
2 {
3
4 try
5 {
6 Request request("http://xenforo.gandaa.lv/index.php/api/auth"); // xenforo api url
7
8 // making the post request
9 const Response postResponse = request.send("POST", "login=" + username + "&password=" + password, {
10 "Content-Type: application/x-www-form-urlencoded", "XF-Api-Key: swZTSKCQP67kW4OrwuXcBdvgSVS7peaY" // your xenforo api key
11
12 });
13
14
15
16 }
17 catch (const exception & e)
18 {
19
20
21
22
23 EXIT_FAILURE;
24 }
25
26 iPage = 0;
27
28 }