在服务器忙模式下可以访问http连接

时间:2015-08-02 15:18:39

标签: c# http

我想通过c#中的HttpClient访问一个站点(第三方,我没有服务器端访问它)。一切顺利,但没有事实。我想在一天的特定时间访问该网站3-4分钟。但这次服务器被用户请求淹没,服务器发送http响应代码504。

时间几乎是固定的,也就是说我想从中获取内容。由于用户点击次数过多而导致该时间不可见。

是否有任何技术(例如Keep-Alive标头)可以最大限度地提高我在该网站繁忙时获得响应的机会?我经常搜索,但一无所获。如果你能帮助我,我将不胜感激。谢谢你们。

我正在添加正常的时间请求和响应标题,以便您进一步了解.... 请求标题

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://somesite.com/Appointment.jsp
Cookie: x-bni-ca=2057692237; JSESSIONID=E52C0DEE598BBABAAC74736A09F553B8.bgd-5
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 82

响应标题

HTTP/1.1 302 Moved Temporarily
Date: Fri, 31 Jul 2015 06:46:46 GMT
Cache-control: no-cache,no-store
Pragma: no-cache
Expires: -1
Location: http://somesite.com/applicationid.jsp?errormsg=generated application id is B798A0
Content-Length: 0
Keep-Alive: timeout=5, max=75
Connection: Keep-Alive
Content-Type: text/html;charset=ISO-8859-1

0 个答案:

没有答案