Questions tagged [winhttprequest]

WinHttpRequest COM object is a part of Windows HTTP Services (WinHTTP). It enables the use of WinHTTP from Visual Basic and script languages.

WinHttpRequest COM object is a part of Windows HTTP Services (WinHTTP). It enables the use of WinHTTP from Visual Basic and script languages.

Read the WinHTTP Reference.

177 questions
1
vote
1 answer

WinHTTP Request GET is not retrieving the response in Excel VBA

I have a macro which is triggering a GET call to the portal. Below is the URL structure: https://{P_URL_PORT}/ibm/console/status?text=true&type=cluster&name={P_CELL}&time={tStamp} Here is my macro. Dim WinHttpReq As Object Set WinHttpReq =…
NaveenKumar Namachivayam
  • 1,163
  • 3
  • 25
  • 39
1
vote
0 answers

Inno Setup, WinHttpReq request through proxy server with PAC url

I am currently trying to write a service in Pascal that allows my installation in Inno Setup to communicate through a proxy server. I was able to do it with a host and port number, but now I need it also to implement recorring to a PAC file. I just…
Joao
  • 15
  • 4
1
vote
1 answer

WScript.CreateObject crashes Windows Scripting Host when event handler prefix is specified for WinHTTPRequest

According to the MSDN documentation WinHTTPRequest has four event handlers which should be accessible by specifying an event handler prefix. Unfortunately, doing so causes Windows Scripting Host to crash. The following code crashes Windows…
1
vote
0 answers

Excel VBA WinHttpRequest saved Credentials

I wrote the following code to get the innerHTML text of a website: Public Function GetInnerHtmlBody(ByVal Url As String) As HTMLDocument Dim ResponseDocument As New HTMLDocument Dim MyRequest As New WinHttpRequest With MyRequest …
FireEmerald
  • 1,002
  • 12
  • 21
1
vote
2 answers

WinHTTPRequest : ActiveX component can't create object

I am getting error - 800A01AD while executing the following vbs code. strURL = "http://maps.yahoo.com/maps_result.php?q1=newyork" Set myRequest = CreateObject("WinHTTP.WinHTPPRequest.5.1") myRequest.Open "GET", strURL myRequest.Send msgbox…
user3262242
  • 184
  • 1
  • 3
  • 14
1
vote
2 answers

If _StringBetween didn't find the value

I have created a simple script in AutoIT that checks if a string exists or not, if it exists it will show label else it will show another label here is the script : $text = $oHTTP.ResponseText $status = $oHTTP.Status If $status = 200 Then $array…
roun512
  • 149
  • 11
1
vote
0 answers

Winhttp request give error Error 87 has occurred. Could not close the hSession handle for post json request

hi i am implementing post json request with winhttp function. though no error in code but at time of execution i cant get proper output for it. it gives me error for it like Error 87 has occurred. Could not close the hSession handle. it means open…
user3505712
  • 895
  • 1
  • 11
  • 20
1
vote
1 answer

Recreate HTTPS request decrypted by Fiddler?

I captured and decrypted an HTTPS request using fiddler. It looks about like this: CONNECT qwer1234.com:443 HTTP/1.0 User-Agent: Blabla Example/1.0 Host: qwer1234.com:443 Content-Length: 0 Connection: Keep-Alive Pragma: no-cache A SSLv3-compatible…
Forivin
  • 14,780
  • 27
  • 106
  • 199
1
vote
2 answers

ServerXMLHTTP Timeout in less than 2 seconds using default timeouts

I have a question involving a "timeout" when sending an HTTPS "GET" request using the ServerXMLHTTP object. In order to fool the object to send the request with the logged in user's id and password, I set it up to use a dummy proxy and then…
1
vote
1 answer

Windows 7: Automatic Logon Policy not working for winhttp API VB6 activeX control

I'm using WinHttp to do POSTs in a VB6 activeX control as follows Set WinHttpReq = New WinHttpRequest WinHttpReq.Open "POST", strUrl, False WinHttpReq.SetAutoLogonPolicy AutoLogonPolicy_Always aPostBody = 'Sometext' WinHttpReq.Send…
Yasir Laghari
  • 10,714
  • 4
  • 19
  • 17
1
vote
2 answers

VBA Web Scraping from www.eppraisal.com

I need to fetch data from www.eppraisal.com So I have written following code but it's not working unfortunately: Public Function GetEppraisalValuation() Dim strURL As String Dim strLocationURL As String Dim strEppraisalValue As String …
TechGeek
  • 2,172
  • 15
  • 42
  • 69
1
vote
0 answers

Map errors returned from WinHttpSendRequest using FormatMessage

When invoking WinHttpSendRequest, I get an error value using GetLastError (e.g ERROR_WINHTTP_CANNOT_CONNECT). But when trying to map the error code to a user friendly error message using FormatMessage, no mapping is found. Is there a way to…
mox
  • 6,084
  • 2
  • 23
  • 35
1
vote
0 answers

WinHttpRequest ResponseText getting Empty for text(.txt) file - Windows2008R2/ Windows 7

I'm new to QTP and VBScript and I'm trying to get the text file content as a response(sample URL : http://x.x.x.x/dir/MIS/test_667/logfile.667.txt). The below code is working as required on WindowsXP, but getting 'Empty' ResponseText( sIMPResponse =…
Veera
  • 11
  • 1
  • 2
1
vote
1 answer

Progress indication with HTTP file download using WinHTTP

I want to implement an progress bar in my C++ windows application when downloading a file using WinHTTP. Any idea how to do this? It looks as though the WinHttpSetStatusCallback is what I want to use, but I don't see what notification to look…
Steve Middleton
  • 181
  • 4
  • 13
1
vote
1 answer

Download file with original filename

Using vba and excel, I'm looking to download a file from an url for which I'll not know what the original filename is. Using URLDownloadToFile, or other methods as with WinHttpRequest, expects you to name the file you are downloading. I would like…
Fcoelho
  • 33
  • 1
  • 5