GET and POST functioning

This commit is contained in:
2024-06-05 11:34:55 +02:00
parent 004e9c87f9
commit c6db3d426b
5 changed files with 140 additions and 37 deletions

View File

@ -32,11 +32,18 @@
apiLabel = new Label();
apiText = new TextBox();
callApi = new Button();
resultsText = new TextBox();
statusStrip = new StatusStrip();
systemStatus = new ToolStripStatusLabel();
resultLabel = new Label();
httpVerbSelection = new ComboBox();
callData = new TabControl();
bodyTab = new TabPage();
resultsTab = new TabPage();
resultsText = new TextBox();
bodyText = new TextBox();
statusStrip.SuspendLayout();
callData.SuspendLayout();
bodyTab.SuspendLayout();
resultsTab.SuspendLayout();
SuspendLayout();
//
// formHeader
@ -62,9 +69,9 @@
//
apiText.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
apiText.BorderStyle = BorderStyle.FixedSingle;
apiText.Location = new Point(95, 113);
apiText.Location = new Point(210, 113);
apiText.Name = "apiText";
apiText.Size = new Size(709, 39);
apiText.Size = new Size(594, 39);
apiText.TabIndex = 2;
//
// callApi
@ -78,19 +85,6 @@
callApi.UseVisualStyleBackColor = true;
callApi.Click += callApi_Click;
//
// resultsText
//
resultsText.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
resultsText.BackColor = Color.White;
resultsText.BorderStyle = BorderStyle.FixedSingle;
resultsText.Location = new Point(36, 215);
resultsText.Multiline = true;
resultsText.Name = "resultsText";
resultsText.ReadOnly = true;
resultsText.ScrollBars = ScrollBars.Both;
resultsText.Size = new Size(843, 240);
resultsText.TabIndex = 4;
//
// statusStrip
//
statusStrip.BackColor = Color.White;
@ -109,14 +103,72 @@
systemStatus.Size = new Size(62, 25);
systemStatus.Text = "Ready";
//
// resultLabel
// httpVerbSelection
//
resultLabel.AutoSize = true;
resultLabel.Location = new Point(36, 180);
resultLabel.Name = "resultLabel";
resultLabel.Size = new Size(88, 32);
resultLabel.TabIndex = 6;
resultLabel.Text = "Results";
httpVerbSelection.DropDownStyle = ComboBoxStyle.DropDownList;
httpVerbSelection.FormattingEnabled = true;
httpVerbSelection.Items.AddRange(new object[] { "GET", "POST", "PUT", "DELETE" });
httpVerbSelection.Location = new Point(95, 112);
httpVerbSelection.Name = "httpVerbSelection";
httpVerbSelection.Size = new Size(109, 40);
httpVerbSelection.TabIndex = 7;
//
// callData
//
callData.Controls.Add(bodyTab);
callData.Controls.Add(resultsTab);
callData.Location = new Point(48, 182);
callData.Name = "callData";
callData.SelectedIndex = 0;
callData.Size = new Size(832, 336);
callData.TabIndex = 8;
//
// bodyTab
//
bodyTab.Controls.Add(bodyText);
bodyTab.Location = new Point(4, 41);
bodyTab.Name = "bodyTab";
bodyTab.Padding = new Padding(3);
bodyTab.Size = new Size(824, 291);
bodyTab.TabIndex = 0;
bodyTab.Text = "Body";
bodyTab.UseVisualStyleBackColor = true;
//
// resultsTab
//
resultsTab.Controls.Add(resultsText);
resultsTab.Location = new Point(4, 41);
resultsTab.Name = "resultsTab";
resultsTab.Padding = new Padding(3);
resultsTab.Size = new Size(824, 291);
resultsTab.TabIndex = 1;
resultsTab.Text = "Results";
resultsTab.UseVisualStyleBackColor = true;
//
// resultsText
//
resultsText.BackColor = Color.White;
resultsText.BorderStyle = BorderStyle.FixedSingle;
resultsText.Dock = DockStyle.Fill;
resultsText.Location = new Point(3, 3);
resultsText.Multiline = true;
resultsText.Name = "resultsText";
resultsText.ReadOnly = true;
resultsText.ScrollBars = ScrollBars.Both;
resultsText.Size = new Size(818, 285);
resultsText.TabIndex = 5;
//
// bodyText
//
bodyText.BackColor = Color.White;
bodyText.BorderStyle = BorderStyle.FixedSingle;
bodyText.Dock = DockStyle.Fill;
bodyText.Location = new Point(3, 3);
bodyText.Multiline = true;
bodyText.Name = "bodyText";
bodyText.ScrollBars = ScrollBars.Both;
bodyText.Size = new Size(818, 285);
bodyText.TabIndex = 5;
//
// Dashboard
//
@ -124,9 +176,9 @@
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.White;
ClientSize = new Size(903, 551);
Controls.Add(resultLabel);
Controls.Add(callData);
Controls.Add(httpVerbSelection);
Controls.Add(statusStrip);
Controls.Add(resultsText);
Controls.Add(callApi);
Controls.Add(apiText);
Controls.Add(apiLabel);
@ -138,6 +190,11 @@
Text = "Postman Clone by Tim Corey";
statusStrip.ResumeLayout(false);
statusStrip.PerformLayout();
callData.ResumeLayout(false);
bodyTab.ResumeLayout(false);
bodyTab.PerformLayout();
resultsTab.ResumeLayout(false);
resultsTab.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
@ -148,9 +205,14 @@
private Label apiLabel;
private TextBox apiText;
private Button callApi;
private TextBox resultsText;
private StatusStrip statusStrip;
private Label resultLabel;
private ToolStripStatusLabel systemStatus;
private ComboBox httpVerbSelection;
private TabControl callData;
private TabPage bodyTab;
private TabPage resultsTab;
private TabPage tabPage1;
private TextBox bodyText;
private TextBox resultsText;
}
}