Archived Forum Post

Index of archived forum posts

Question:

Http SynchronousRequest & quickGetStr : No response

Aug 30 '14 at 07:24

Enter the following link into IE, I am able to view the proxy list :

https://nordvpn.com/free-proxy-list/1/?country[0]=CN&allp=all&port&sp[0]=2&sp[1]=1&protocol[0]=HTTP&ano[0]=High&sortby=0&way=0&pp=1

However, if I used chilkat http lib, it is not successful, my code :

Using quickGetStr:

Http2.put_CookieDir("memory");

Http2.put_SaveCookies(true);

Http2.put_ConnectTimeout(40);

Http2.put_ReadTimeout(40);

Http2.put_FollowRedirects(true);

const char *res = Http2.quickGetStr("https://nordvpn.com/free-proxy-list/1/?country[0]=CN&allp=all&port&sp[0]=2&sp[1]=1&protocol[0]=HTTP&ano[0]=High&sortby=0&way=0&pp=1");

*res equals 0 (ie. no valid response)

======================================================================

Using SynchronousRequest

Request2.put_HttpVerb("GET");

Request2.put_Path("/free-proxy-list/1/?country[0]=CN&allp=all&port&sp[0]=2&sp[1]=1&protocol[0]=HTTP&ano[0]=High&sortby=0&way=0&pp=1");

Request2.AddHeader("Accept","text/html,application/xhtml+xml,/");

Request2.AddHeader("User-Agent","Mozilla/5.0 (compatible; MSIE 9.0; QDesk 2.3.1185.202; qdesk 2.4.1263.203; Windows NT 6.1; WOW64; Trident/6.0)");

Request2.AddHeader("Host","nordvpn.com");

Request2.AddHeader("Connection","Keep-Alive");

Response2 = Http2.SynchronousRequest("nordvpn.com",443,true,Request2);

Response2 equals 0 (no valid response true);

=======================================================================================

Is there a problem with my code ?

Please advise.

Thanks.

Best regards

Dragon


Answer

To debug, I added the following code to check the traffic via Fiddler :

Http2.put_ProxyDomain("127.0.0.1");

Http2.put_ProxyPort(8888);

==================================================

No issue at all ! I am able to get the proxy list.

However, once I removed (comment out) the proxy code, no valid response again !

I believe that I am missing something in my code.

Appreciate your fast response.

Thanks.

Best regards

Dragon