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
2 answers

HTTP Error 401.1 when using WinHttp.WinHttpRequest.5.1 in classic ASP site

General information Operating System: Windows Server 2003 R2 Service pack 2 Webserver: IIS 6 NTAuthenticationProviders: NTLM only Webapplication: Classic ASP Browsers used: IE7, IE8, IE9 There’s a Classic ASP web application called knowledgebase,…
Bart Huiskes
  • 71
  • 1
  • 7
0
votes
0 answers

How to remove Charset from Content-Type when using WinHTTP?

When you use the WinHttpRequest object to POST data to a server: IWinHttpRequest http = CoWinHttpRequest.Create(); http.Open("POST", "http://example.contoso.com/api/v1/grobber", false); http.SetRequestHeader("Content-Type",…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
0
votes
0 answers

POST using VBA when trying to send a JSON to the API returns empty

I need to send data from who accessed the worksheet in a Json format to an API, it manages to send it and the API receives the information, but only an empty array comes. I'm trying to use the "WinHttp.WinHttpRequest.5.1" version to perform this…
0
votes
1 answer

How to rewrite a cURL request to VBA WinHttp.WinHttpRequest.5.1

I have a cURL request which I'm able to run via Windows PowerShell: curl -k -X GET "https://api.xxx.com/open/api/exchange-rates/v1/exchange-rates?validityDateTime=2023-03-30T06%3A00%3A00.000Z" -H "accept: */*" -H "x-correlation-id:…
ThomassoCZ
  • 73
  • 6
0
votes
1 answer

Why does WinHTTPRequest responseText return a different value to MsgBox than Debug.Print dynamic web pages

I encountered something rather curious today while preparing to write a pure vba simple javascript engine. Pulling the document from http, I'd expect to get what it outputs in MsgBox. The plaintext code of the website with javascript tags, etc. I…
0
votes
0 answers

How to import unicode data from WinHttpReq

WinHttpRequest is used to import bank statement from Nordiget.com containing characters from Windows-1257 code page. For an unknown reason, FoxPro does replace accented characters with? signs. To fix this, COMPROP(WinHttpReq ,"UTF8",1) is added: …
Andrus
  • 26,339
  • 60
  • 204
  • 378
0
votes
0 answers

Using msxml library to load XML file with ServerHTTPRequest

I have a problem with loading XML file with the use of WinHTTP. There seem to have been a change in windows 11 that makes it impossible to send requests with WinHTTP. I checked network traffic and indeed there is no request produced when running the…
Revuimar
  • 303
  • 1
  • 11
0
votes
0 answers

Calling an API from Excel Macro to POST data using WinHTTPRequest

I am trying to call an API for sending SMS from Excel Macro. I tried sending using MSXML2.XMLHTTP it sends SMS successfully from my system, But in client's system it is giving error "An error occurred in the secure channel support". Set httpObject =…
Jacob
  • 7
  • 3
0
votes
1 answer

WinHTTP is not communicating with local device using IP config

I was trying to communicate using winHTTP for communication with the device using an IP address connected via ethernet cable. The connection and session are happening. However, winhttpreceiveresponse is always null. Here is my piece code which I…
0
votes
0 answers

Winhttp to send data back and forth between networked computer?

I am trying to send and retrieve data to/from a remote client computer. I can't use DCOM or Named Pipes because ports 135 and 445 are closed and cannot be opened. The advantage of winhttp, according to Microsoft docs, is you can use http as the…
JeffR
  • 765
  • 2
  • 8
  • 23
0
votes
0 answers

ServerXMLHTTP/WinHTTPRequest Certificate Chain Issued by Untrusted Authority

I am attempting to execute a request using the following: Set httpRequest = CreateObject("WinHttp.WinHttpRequest.5.1") 'Was initially trying ServerXMLHTTP here httpRequest.Open "POST", "", False httpRequest.Send payload Instead,…
A. Rahm
  • 39
  • 4
0
votes
1 answer

Is it possible to use winhttp to download GAS json file in google drive

I would like to download the Json file from google drive using VBA. Sub downloadGAS() Dim winhttp As Object Set winhttp = CreateObject("winhttp.winhttprequest.5.1") Dim sURL As String sURL =…
8平民
  • 49
  • 5
0
votes
0 answers

Cant send a WinHTTP request in a DLL, but works in an EXE

Whenever I try to call the WinHttpSendRequest() function, it always returns null. It is worth mentioning that the function works fine in a normal .exe, but doesn't work in a .dll. I was trying to find a solution for a long time. Here is the…
0
votes
0 answers

How to format WinHttpRequest.ResponseText into a Regular Multi line, Seperated HTML Format?

I have written a VBA code which sends an http request and will get a response from the provided URL. The .responsetext then will copied to my userform textbox control. The only problem is that it is in linear format. I want it to be regular HTML…
Milad
  • 77
  • 11
0
votes
1 answer

Parse line from HTML response in Excel VBA

I am looking to parse a 'WinHttpRequest' response in Excel VBA to pull a specific line from the HTML response. Here is the code for the HTTP request. Function getSetName(ByVal setNUMBER As String) As String Dim oRequest As Object Dim…
afskymonkey
  • 17
  • 1
  • 4