用C#实现HTTP请求比较容易实现。根据网上的程序修改而成,实现代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace HTTP_Request_V1
{
public partial class Http_Post : Form
{
public Http_Post()
{
InitializeComponent();
}
private void btn_Go_Click(object sender, EventArgs e)
{
string postData = "username=" + txt_User.Text + "&password=" + txt_Pwd.Text;
postData += ("&vcode="