Questions tagged [winhttp]

Windows HTTP Services (WinHTTP) is an HTTP client application library provided by Microsoft as part of Windows to send the requests through the HTTP protocol to other HTTP servers.

See Windows HTTP Services page for the WinHTTP documentation.

See also this seminal MSDN article detailing the use of the library's asynchronous API in C++.

This tag should be used for questions relating specifically to the WinHTTP library.

417 questions
1
vote
1 answer

How can I convert a Curl command into a WinHttpRequest object in vba excel

Given a Curl command : curl https://URL -u xxxxxxxxxxxxxxxxxxxxxx: -X POST -F "source_file=@/tmp/my.doc" -F "DoSomething=checkit" The expected result is a Json string. How can this be used in VBA Excel macro utilizing a…
ckosh
  • 7
  • 2
1
vote
0 answers

Retrieving IP address from HINTERNET handle

I am trying to retrieve the IP address given a host name after the DNS resolution. I am using WinHTTP to connect to the said host and I've tried searching everywhere but I can't find a way to retrieve an IP address. I was considering using the…
Dan
  • 842
  • 3
  • 17
  • 29
1
vote
0 answers

fiddler debugging question pertaining to vba use of winhttp

I have what i think is a simple question, but cannot find it on fiddlers website or with goggle. I'm trying to download a file with vba, using winhttp. To me my request looks good, but fails.I successfully used fiddlers "composer" to simulate the…
Jim Carney
  • 87
  • 2
  • 10
1
vote
1 answer

Getting encrypted body response WinHttp HTTPS

I'm trying to connect with google.com with port 443 SSL but when i call to WinHttpReadData returns encrypted text, but with WinHttpQueryHeaders i'm getting plain/text response headers from server. Not sure at all why happens that, im referring to…
1
vote
1 answer

How to send a form-data POST request with VBA in Excel using WinHTTPRequest

I am building an API using FastAPI that must be accessible from Excel VBA. FastAPI's OAuth2 authentication mechanism requires me to send a "form-data" POST request, but I don't know how to do this using WinHTTPRequest in VBA. I already have a…
Thomas Browne
  • 23,824
  • 32
  • 78
  • 121
1
vote
0 answers

what the equivalent of WINHTTP_NO_CLIENT_CERT_CONTEXT under Wininet?

under winhttp I can do WinHttpSetOption(Result, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, WINHTTP_NO_CLIENT_CERT_CONTEXT, 0); Under Wininet, i already found the INTERNET_OPTION_CLIENT_CERT_CONTEXT option, but I can't find the equivalent for…
zeus
  • 12,173
  • 9
  • 63
  • 184
1
vote
0 answers

MSXML2.XMLHTTP fails to send request cookie header

I'm trying to create some automated web searches in this website using Excel VBA but in order to use it, you need to agree with it's terms and conditions. The website then stores your agreement in a cookie "agree=True". But, while using…
1
vote
1 answer

VBA not enough memory resources error when download a large file

when I try to download a large file (2GB) using this function this error appears "not enough memory resources are available to complete this operation". so, what can I do? Function DownloadFile(ByVal URL As String, ByVal Path As String, ByVal…
mzoon
  • 41
  • 5
1
vote
0 answers

WinHTTP Open method is causing delay?

I am using WinHTTP 5.1 in one of my Delphi FMX application which connects to REST servers in parallel. There are lot of GET and POST which are called continuously by the client. I have observed that after say 200-300 GET commands below method is…
Padam
  • 117
  • 1
  • 7
1
vote
0 answers

scraping hidden input without IE

I'm back cause new problem. i used vba with Excel for an enterprise intranet web page. So the IT staff has changed something and my old code doesen't works. I'm using winhttp, vba excel , the url is a secured https I need to get all the hidden…
karmico
  • 11
  • 3
1
vote
2 answers

VBA downloading file with login isn't working

I'm trying to download a file from this website, tried a bunch of code i can find and the file is downloaded but shows the html of the login page Below are 2 versions that I tried. I tried every code snippet I could find on SO and have had no luck…
lalachka
  • 403
  • 5
  • 16
  • 36
1
vote
2 answers

Using a IE 11 Cookie in a vbscript WinHttp.WinHttpRequest.5.1 GET

I am trying to pull website data using WinHttp.WinHttpRequest.5.1. The website requires login and the cookie is stored with IE11. WinHttp.WinHttpRequest.5.1 creates it's own instance and therefore is not logged in to the requested website. Is…
user8688718
1
vote
1 answer

ClearMyTracksByProcess Without Dialog | WinHttp.WinHttpRequest.5.1 | MSXML2.XMLHTTP

I have a VBS that runs CreateObject("MSXML2.XMLHTTP").Open "GET" however, I need to delete the IE11 cache before it runs because the get keeps pulling a cached version of the website that wont expire for 1 minute after the inital get. If I use…
1
vote
0 answers

Asyncronous WinHTTP API & APC mix

I perform asyncronous WinHttp API calls ( WINHTTP_FLAG_ASYNC flag is set in WinHttpOpen(...) ) inside APC callback. I'm afraid WinHttp reentrance, mentioned in …
1
vote
1 answer

Set credentials when using ntlm (kerberos) authentication

I have a c++ application which using NTLM authentication method (WinHttpSetOption). what I'm trying to do is to set the credentials, meaning: the NTLM uath is using the logged on credentials, I want to provide him the credentials myself (in…
haim
  • 11
  • 3