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

Assigning Dynamic value within Json

I am trying to do POST request by using "WinHttp.WinHttpRequest.5.1". It works if I send the JSON as shown in #1. However, I want to assign value and make a call with a variable (#2). Is there a way to do that without using third party libs…
nPcomp
  • 8,637
  • 2
  • 54
  • 49
0
votes
1 answer

Why does WinHttpOpen with WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY bypasses Charles Proxy?

I'm trying to use WinHTTP with Charles proxy. When I use the WINHTTP_ACCESS_TYPE_NAMED_PROXY option and URL to Charles, it logs the the traffic going through it. When I'm using the WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY, the connection works, but is…
Uri Raz
  • 435
  • 1
  • 3
  • 15
0
votes
1 answer

Error when try to import URL Json to Excel

I'm trying to import the information in JSON format from the following Url by WinHttpRequest: https://bet.hkjc.com/football/getJSON.aspx?jsontype=odds_allodds.aspx&matchid=default Sub test() Dim xmlhttp As Object Dim strUrl As String: strUrl =…
Alana
  • 89
  • 8
0
votes
0 answers

Delphi IWinHTTPRequest SetRequestHeader

I am trying to send custom header values in a HTTP POST but the site I am posting to tells me they are just receiving nulls. I have tried setting the values OSName, OSVersion, ProductName, ProductVersion as a String, WideString and OLEVariant, but…
user3396999
  • 3
  • 1
  • 3
0
votes
2 answers

WinHttp.WinHttpRequest.5.1 URL ENCODE

I'm trying to use the Qrickt API: https://qrickit.com/qrickit_apps/qrickit_api.php to create a QRCode for Google Map address in VBA. To do this I have to send a Http request like…
Marco
  • 5
  • 1
  • 4
0
votes
0 answers

Translating working Python API script into VBA -

I've been scouring the interwebs for days now looking for the solution to translating my API script into VBA to allow it to operate directly within an Excel file. I have managed to replicate the signature key that is produced in my python script.…
Peter Connolly
  • 121
  • 1
  • 1
  • 8
0
votes
1 answer

WinHTTP Request fails (timeout). Why?

So, I'm trying to send a request to a http server from VBA using the WinHttpRequest class. I've already made a similar code which sends requests to another server, and it worked. This one won't even go through the ".Send". It fails (timeout). I've…
Julio Hintze
  • 128
  • 2
  • 11
0
votes
1 answer

VBA HTTP Request POST returning empty string

I am working on a procedure, in MS-Access VBA, to POST an XML text string to a web service and process the XML text string that is returned from the service. The issue I am having is that the responseText property is always empty when it should…
PcDave69
  • 1
  • 1
0
votes
1 answer

How to get the direct link from url that have a session ID by vbscript?

I'm trying to get the direct link from url, so i use this function to provide me the header location and for this example it works fine : Option Explicit Const Title = "Get Header Location" Const WHR_EnableRedirects = 6 Dim URL,Result URL =…
Hackoo
  • 18,337
  • 3
  • 40
  • 70
0
votes
0 answers

WinHttpRequest using users own ActiveDirectory credentials

I'm using the following code to grab an image (of a part held on a SharePoint site) to display in an excel sheet. I'd like to use the user's own Active Directory credentials to access the url. The code I've got so far is: Dim Request As Object Dim…
0
votes
1 answer

Calling TLS1.2 from VBA

I cannot call a RESTfull API from Excel VBA because the API using TLS1.2. There is, apparently, no way in VBA to set the option to use TLS1.2. I tried setting WINHTTP_OPTION_SECURE_PROTOCOLS option but it is being ignored. Does anyone know about a…
anjulis
  • 219
  • 1
  • 4
  • 14
0
votes
0 answers

downloading zip file from buffer to zip file in C++

I am trying to download a file from internet in C++. Hold the downloaded contents into HInternet Instance. Also I populated the header information of HInternet instance. That is looks like Header contents: HTTP/1.1 200 OK Cache-Control:…
CrazyCoder
  • 772
  • 5
  • 11
  • 31
0
votes
0 answers

WinHttpRequest Run time error (-2147012867)

I am running the following code in 4 computers: The code makes a simple HTTP request to a target server using POST. Sub test() valueParam1 = "value1" valueParam2 = "value2" user = "myUser" pass = "myPass" headerName =…
Ihidan
  • 419
  • 1
  • 6
  • 20
0
votes
0 answers

Download images from an https URL

I am trying to download images from an HTTPS site using Username and password using VBA from MSExcel or MSAccess. The image when opened with Windows Photo Viewer shows the following message: Windows Photo Viewer can't open the picture because the…
sifar
  • 1,086
  • 1
  • 17
  • 43
0
votes
1 answer

Use of WinHttpRequest in Excel 2003 under XP

I'm using the code below to perform POST and GET requests to my HTTP+JSON webservice. Everything runs perfectly under Win7 and Excel 2013. While testing under Windows XP and Excel 2003, the GET worked fine (request body contains JSON object), but…
RuudSieb
  • 523
  • 5
  • 13