WinHttp.WinHttpRequest.5.1 Kullanım Örneği
Salı, 09 Ağu 2016
yorum yok
var oHttp : variant; //http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP+Set~Proxy~Server~and~Port.txt //Instantiate a WinHttpRequest objec oHttp:=CreateOleObject('WinHttp.WinHttpRequest.5.1'); //Initialize an HTTP request. oHttp.open('POST', Url, false); oHttp.setRequestHeader('User-Agent', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)'); { //HttpRequest SetCredentials flags. HTTPREQUEST_PROXYSETTING_DEFAULT = 0; HTTPREQUEST_PROXYSETTING_PRECONFIG = 0; HTTPREQUEST_PROXYSETTING_DIRECT = 1; HTTPREQUEST_PROXYSETTING_PROXY = 2; } //Use proxy_server oHttp.setProxy(2, 'xxyydd:80',''); oHttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); //Send the HTTP request. oHttp.send(oleVar); showmessage(oHttp.responsetext);