GET /api/?type=json&getlist=1 HTTP/1.1 clientmarket: 1 sessionid: ts: 7 Accept-Encoding: gzip pv: 2.2 device: 000000000000000 mac: model: sdk nettype: internet mktvername: 4.0 channel: WAf+MfsjFao6DAlFVsg6eGC0U+WVSG3d resolution: 320x480 density: 160 sdkversion: 8 vender: 17001 authorizations: 0 applang: 3 abi: armeabi|unknown partial: 0 Host: shuoxia.net Connection: Keep-Alive User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)
你看这有好多好多http头信息。C#如何模拟这些信息头请求呢?
创建一个HttpWebRequest, 使用这种方式加入头信息:
System.Net.HttpWebRequest request = ....
request.Headers["clientmarket"] = "1";