【发布时间】:2021-04-18 18:23:17
【问题描述】:
大家好,我很难连接和断开调制解调器 3g,我通过 Fiddler 找到了 POST 请求的外观,但无法通过按钮下的 C# 使其工作。有人有经验吗? 我共享通过 Fiddler 嗅探的数据,希望有人知道如何修复它:(
// Connect
POST http://192.168.1.1/api/dialup/dial HTTP/1.1
Host: 192.168.1.1
Connection: keep-alive
Content-Length: 75
Accept: */*
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Origin: http://192.168.1.1
Referer: http://192.168.1.1/html/index.html
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,pl-PL;q=0.8,pl;q=0.7
<?xml version="1.0" encoding="UTF-8"?><request><Action>1</Action></request>
// Disconnect
POST http://192.168.1.1/api/dialup/dial HTTP/1.1
Host: 192.168.1.1
Connection: keep-alive
Content-Length: 75
Accept: */*
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Origin: http://192.168.1.1
Referer: http://192.168.1.1/html/index.html
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,pl-PL;q=0.8,pl;q=0.7
<?xml version="1.0" encoding="UTF-8"?><request><Action>0</Action></request>
【问题讨论】:
-
我认为事情过于复杂,因为这个请求需要代理才能继续代码:(