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
2
votes
1 answer

Binary data returned from IWinHttpRequest are altered, unable to convert Variant to array of bytes

In my setup scenario at the end of the installation process each client downloads application key from the server. The file consists of ~64 random bytes, binary, non-encoded. It should be stored in configuration file in installation directory. The…
peku33
  • 3,628
  • 3
  • 26
  • 44
2
votes
0 answers

C++ Expected a ';' error in code

I am really confused why i get the following error expected';' on hSession on line 13. I am not missing any semi-colons so im confused as to what this error means on my code: #include "stdafx.h" #include #include #include…
jimmy
  • 73
  • 1
  • 7
2
votes
2 answers

How to make HTTP POST request with pywin32 / pypiwin32?

Background I have succesfully made some HTTP GET requests with pypiwin32 using import pythoncom import win32com.client pythoncom.CoInitialize() h = win32com.client.Dispatch('WinHTTP.WinHTTPRequest.5.1') h.SetAutoLogonPolicy(0) # log in…
Niko Föhr
  • 28,336
  • 10
  • 93
  • 96
2
votes
0 answers

httpwebrequest using a pfx?

I'd like to reproduce the following chunk of vbscript using C#. sURL = "https://server/service.dll" sXML = "generated ticket" dim winHTTPReq: Set winHTTPReq =…
nerraga
  • 614
  • 7
  • 17
2
votes
0 answers

Enable WinHttpRequest in Windows Firewall

I have a VBA code that sends a WinHttpRequest 5.1 request. It works perfectly on my home computer, but times out at work, so I believe the firewall is blocking the request. What is the name of the program that I need to enable in Windows Firewall…
kainC
  • 400
  • 1
  • 3
  • 14
2
votes
1 answer

http response text fetching incomplete html

I have a code (given below) in excel vba that fetches web page source html. The code is working fine but the html that it fetches is incomplete. When the line webpageSource = oHttp.ResponseText is executed, the variable webpageSource contains…
Sabha
  • 621
  • 10
  • 32
2
votes
1 answer

Server returned error - The data necessary to complete this operation is not yet available for VB script

Why can't the code below connect successfully to servers that require SHA2 certs? One of our partners had a SHA2 upgrade and they require us to have SHA2 certs. When we connect to their site that doesn't require SHA2 certs(only SHA1) it connects…
BV45
  • 605
  • 3
  • 10
  • 27
2
votes
0 answers

How do I use WinHttpRequest and SetTimeouts with small values?

I'm trying to perform a web request using AHK that will time out after 1 second. This script will be called after a certain key combination. For my smartphone I have a small HTML app that does the call using AJAX and times out properly after 1…
Ericvf
  • 191
  • 1
  • 6
2
votes
0 answers

Progress bar for download with VBA and WinHttpRequest

I have an Access 2010 database using the WinHttp.WinHttpRequest.5.1 object to login into a server and then download Excel files that then get imported. The download of the files is painfully slow, so desperately need a progress bar or similar. But…
Matt B
  • 21
  • 1
2
votes
1 answer

VBA Kerberos Authentication

I want to send a POST request to a Java servlet with VBA using the Kerberos ticket from the Windows Log In for authentication and then retrieve a JSON response from the servlet. Can I achieve this without using an InternetExplorer object, e.g. using…
Sebastian
  • 83
  • 1
  • 2
  • 6
2
votes
1 answer

Do I really need to register WinHttp on Windows Server 2008 before using WinHttpRequest.5.1?

Basically I think this is a bug in Windows Server 2008, but I am not a COM ninja so it seems equally likely that I'm just doing something dumb. The question is: bug or programmer error? We use WinHttpRequest (the ActiveX component of WinHttp) to…
Robert Calhoun
  • 4,823
  • 1
  • 38
  • 34
2
votes
1 answer

SQL Server web service query character limitations

I am writing a procedure take the data from the web service. The web services gives the data in an XML string. However, It is truncating the data being pulled from the website. It runs perfectly when executed in SSMS. It truncated the data to 2048…
2
votes
1 answer

Upload Excel xlsm file to php script using VBA

I would like to upload an Excel xlsm file to a php script from VBA. I found the following code: Dim WinHttpReq As Object Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1") Dim strURL As String Dim StrFileName As String Dim FormFields As…
Albertus
  • 911
  • 2
  • 10
  • 19
2
votes
2 answers

VBA WinHttp no mapping character

Here is the source of a function I use get HTML code for further proccessing: Public Function DownloadTextFile(url As String) As String Dim oHTTP As WinHttp.WinHttpRequest Set oHTTP = New WinHttp.WinHttpRequest oHTTP.Open Method:="GET",…
user2127981
  • 51
  • 2
  • 4
2
votes
1 answer

WinHttpRequest equivalent in Javascript

I am looking to use an API from my webpage and currently have a working VB example that works in VBA and was hoping that an equivalent method could be created in Javascript Set http = CreateObject("WinHttp.WinHttpRequest.5.1") http.Open "POST",…
Rick
  • 1,063
  • 8
  • 26
1 2
3
11 12