GET and POST functioning
This commit is contained in:
@ -8,6 +8,7 @@ public partial class Dashboard : Form
|
||||
public Dashboard()
|
||||
{
|
||||
InitializeComponent();
|
||||
httpVerbSelection.SelectedItem = "GET";
|
||||
}
|
||||
|
||||
private async void callApi_Click(object sender, EventArgs e)
|
||||
@ -21,11 +22,18 @@ public partial class Dashboard : Form
|
||||
return;
|
||||
}
|
||||
|
||||
HttpAction action;
|
||||
if (Enum.TryParse(httpVerbSelection.SelectedItem!.ToString(), out action) == false)
|
||||
{
|
||||
systemStatus.Text = "Invalid Http Verb";
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
resultsText.Text = await _apiAccess.CallApiAsync(apiText.Text);
|
||||
resultsText.Text = await _apiAccess.CallApiAsync(apiText.Text, bodyText.Text, action);
|
||||
callData.SelectedTab = resultsTab;
|
||||
resultsTab.Focus();
|
||||
|
||||
systemStatus.Text = "Ready";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user