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

WinHTTP Multiple Asynchronous Requests

I need to pull data from roughly 6000 pages of a website. After doing some research, I decided to give WinHTTP a shot. I was able to get this working, however I was doing things synchronously, so it took a while to complete. I am now attempting to…
Jamal Winters
  • 33
  • 2
  • 5
3
votes
2 answers

Configuring proxy with WinHTTP and Excel

I'm using WinHTTP to do a GET request in an Excel VBA Macro. However, if I try to do the request from a machine in a network with a proxy, it does not work. If I configure it manually, it works, but I don't think the people who'll use the tool I'm…
Yuri Oliveira
  • 35
  • 1
  • 1
  • 4
2
votes
1 answer

VBA WinHttp request:parameter is incorrect (error 80070057)

I have this script to automatically fetch Google Analytics results, it has worked fine for over a year. All of the sudden it stopped working. I'm getting error 80070057: parameter is incorrect This is the code. And yes, I'm using a proxy. The error…
Jelle De Loecker
  • 20,999
  • 27
  • 100
  • 142
2
votes
1 answer

Work with WinHttpRequest.ResponseStream (related to IStream) in Classic ASP?

Is there a way to work with the ResponseStream property of WinHttp.WinHttpRequest.5.1 in VBScript/ASP? At least the IStream interface (to which ResponseStream is related) is integrated into ASP to a certain degree. Or is that the limit of what you…
Lumi
  • 14,775
  • 8
  • 59
  • 92
2
votes
1 answer

MSXML / ServerXmlHttp POST Failing intermittently (Delphi)

I have some legacy Delphi code that POSTs XML to a secure web server using the MSXML component. The code has been working fine for years. Recently, we made some changes that makes the XML file size a bit larger, but not by much. The XML size…
sse
  • 987
  • 1
  • 11
  • 30
2
votes
0 answers

Numeric values of WinHTTP constants (eg. WINHTTP_NO_CLIENT_CERT_CONTEXT)

I need to set this property for a WinHttp request... BOOL fRet = WinHttpSetOption(hRequest, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, WINHTTP_NO_CLIENT_CERT_CONTEXT, …
Martin Holland
  • 291
  • 1
  • 14
2
votes
0 answers

Delaying HTTP request phases using FiddlerCore

I am using FiddlerCore to test out my applications behavior when waiting a long time for server response. I am using c++ winhttp.h library in my app. I am trying to introduce delay before triggering each async callback. So far I have tried two…
2
votes
1 answer

Fetch cookies from WebView2 Edge website login for WinInet/WinHTTP crawl

Suppose I am using WinInet/WinHTTP for crawling a website. In the past I could simply ask a user to login to a website using either embedded IE control or the IE browser and WinInet would use the same cookies as the IE browser. Now that will not…
Tom
  • 3,587
  • 9
  • 69
  • 124
2
votes
0 answers

Web scraping client certificate issue WinHttp - excel VBA

So, I'm trying to scrape the following public site using vba and the WinHttp library: https://auctions.seecao.com/DAILY_AUCTION_LIST Having examined the network traffic when the "Show Data" button is clicked, I came up with my code: Sub test() Dim…
2
votes
3 answers

HttpAddUrl on localhost fails for non-admin users

Using the Windows HTTP API I'm running a HTTP file server on localhost. This involves calling HttpAddUrl(hRequestQueue, L"http://localhost:80/", NULL). This fails with ERROR_ACCESS_DENIED unless the user runs the application as administrator. I…
AshleysBrain
  • 22,335
  • 15
  • 88
  • 124
2
votes
0 answers

Visual Basic for Application winhttp.dll WinHttpOpenRequest returns 87 (invalid parameter)

this is WinHttpOpenRequest function: WINHTTPAPI HINTERNET WinHttpOpenRequest( HINTERNET hConnect, LPCWSTR pwszVerb, LPCWSTR pwszObjectName, LPCWSTR pwszVersion, LPCWSTR pwszReferrer, LPCWSTR *ppwszAcceptTypes, DWORD dwFlags ); and…
NeW
  • 49
  • 1
2
votes
1 answer

How to get the authorization code value from the redirect URI in VBA using XMLHTTP60 object?

I am trying to get the authorization code from my VBA macro as given here, https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online While I know a web page URL will get the code appended, I am…
codebug
  • 197
  • 1
  • 3
  • 15
2
votes
1 answer

VBA: Download a picture via HTTPS

I'm trying to download a picture from a website (Grafana monitoring tool, API) using VBA (MS Access 2016). It's a HTTPS address using a self signed ceritificat and requires username and password for authentication. I'm currently using the following…
ibkl
  • 43
  • 5
2
votes
0 answers

How to Use WinHttpRequest (WinHTTP Services) in Excel VBA to Stream Data from Websocket Server

I would like to stream data from a websocket server using VBA in an Excel workbook. This is the actual data stream I would like to receive and process in VBA: Would you recommend using WinHttpRequest (WinHTTP Services) or any other service to…
AlexR
  • 5,514
  • 9
  • 75
  • 130
2
votes
1 answer

WinHttp doesn't work when hostname doesn't contains www. (error 12029)

I am testing this winhttp example from http://msdn.microsoft.com/en-us/library/aa384270%28v=vs.85%29.aspx DWORD dwSize = 0; DWORD dwDownloaded = 0; LPSTR pszOutBuffer; BOOL bResults = FALSE; HINTERNET hSession = NULL, …
riviraz
  • 479
  • 1
  • 10
  • 22