mirror of
https://github.com/JuniorDark/RustyHearts-Launcher.git
synced 2026-05-07 05:21:44 -04:00
Add more error handling
This commit is contained in:
parent
7917f223e1
commit
71f7609dc5
4 changed files with 32 additions and 11 deletions
|
|
@ -37,7 +37,7 @@ namespace RHLauncher
|
|||
private async Task<string> SendEmailRequestAsync()
|
||||
{
|
||||
using HttpClient client = new();
|
||||
HttpResponseMessage response = await client.PostAsync(SendCodeUrl, new FormUrlEncodedContent(new[]
|
||||
using HttpResponseMessage response = await client.PostAsync(SendCodeUrl, new FormUrlEncodedContent(new[]
|
||||
{
|
||||
new KeyValuePair<string, string>("email", EmailTextBox.Text),
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ namespace RHLauncher
|
|||
private async Task<string> VerifyCodeSendRequestAsync()
|
||||
{
|
||||
using HttpClient client = new();
|
||||
HttpResponseMessage response = await client.PostAsync(VerifyCodeUrl, new FormUrlEncodedContent(new[]
|
||||
using HttpResponseMessage response = await client.PostAsync(VerifyCodeUrl, new FormUrlEncodedContent(new[]
|
||||
{
|
||||
new KeyValuePair<string, string>("email", EmailTextBox.Text),
|
||||
new KeyValuePair<string, string>("verification_code", CodeTextBox.Text),
|
||||
|
|
@ -113,7 +113,7 @@ namespace RHLauncher
|
|||
private async Task<string> SendRequestAsync()
|
||||
{
|
||||
using HttpClient client = new();
|
||||
HttpResponseMessage response = await client.PostAsync(RegisterUrl, new FormUrlEncodedContent(new[]
|
||||
using HttpResponseMessage response = await client.PostAsync(RegisterUrl, new FormUrlEncodedContent(new[]
|
||||
{
|
||||
new KeyValuePair<string, string>("windyCode", NameTextBox.Text),
|
||||
new KeyValuePair<string, string>("email", EmailTextBox.Text),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue