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

Do WinInet or WinHTTP support custom ports? If so, how do I implement it?

I am trying to download a file using both HTTP and HTTPS (in different scenarios) from a service which defaults to using ports 5080 and 5443, respectively. I wanted to use WinInet (or WinHTTP) as they're native to Windows, but it appears that both…
Justin Shidell
  • 588
  • 1
  • 5
  • 16
1
vote
2 answers

Getting the actual total header size of a request from WinHttp

The title pretty much says it all; It's easy enough to get the size of the headers in the server's response from WinHttp, but I need to know the TOTAL size of my request, including the HTTP version, verb, URL, and any random stuff the API is…
sqykly
  • 1,586
  • 10
  • 16
1
vote
1 answer

WinHTTP causes Apache web server (localhost) to respond with http status 400 on Windows Vista

I'm trying to send a request to an apache web server using WinHTTP. My code is working from Windows 7 to Windows 11, but on Windows Vista I receive an error 400 from the server after sending the request. My code looks as follows: if(!(cp->connection…
Louis Bernard
  • 229
  • 4
  • 20
1
vote
1 answer

sending http post request in c with wininet.h

i want to send a http post request in c with the wininet.h library. But i dont know how to do this. I only find c++ tutorials everywhere but none for c. Can someone show me how to do this? I appreciate any help.
1
vote
1 answer

Delphi, Winhttp, Google Login, Fusion Tables

This is the continue of my previous question: Delphi, WebBrowser, Google Login, FusionTable But the test with WinHTTP also failed as TWebBrowser based test... And this is one question as you wish... :-) I have one table what is NOW PUBLIC, but when…
durumdara
  • 3,411
  • 4
  • 43
  • 71
1
vote
1 answer

sending a pointer of global variable's member to WinHttpQueryHeaders (WinHTTP API) does not change it's value

I have the following code snippet: // Using HttpQueryInfo to obtain the size of the buffer into dwSize. if (!WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, NULL,…
Guy Sadoun
  • 427
  • 6
  • 17
1
vote
0 answers

Invoke-WebRequest, The request was aborted: Could not create SSL/TLS secure channel

Trying to connect to a website on an API. I can connect from Windows 10, Server 2016, Server 2019, but not from Server 2012r2. Using WinHttp SendRequest, the error is 12175. "One or more errors were found in the Secure Sockets Layer (SSL)…
Joseph Willcoxson
  • 5,853
  • 1
  • 15
  • 29
1
vote
1 answer

WinHTTP getElementsByTagName() only shows opening tag for "section"

Using AhtuHotkey 2.0 Beta1 (i assume VBA script as well) getElementsByTagName() only shows opening tag for HTML5 tags section and nav however works with all other HTML4 tags. AutoHotkey Code HTMLObj :=…
LilBro
  • 81
  • 5
1
vote
1 answer

WinHttpRequest Object returns "â??" instead of "✓" (U+2713)

I am using Excel 2007 (12.0.4518.1014) I have been using the WinHttpRequest Object to perform API GET Requests on a web service that hosts data for me. Everything else works properly and it grabs the JSON formatted data from the web service and puts…
Toddleson
  • 4,321
  • 1
  • 6
  • 26
1
vote
0 answers

WinHttpRequest: Send method

I'm trying to pass parameters in the request body, the documentation says : The request to be sent was defined in a prior call to the Open method. The calling application can provide data to be sent to the server through the Body parameter. If the…
1
vote
0 answers

WinHttpSendRequest continuously fails with windows error code 87, ERROR_INVALID_PARAMETER (C++)

I am trying to send an http post request through a proxy that has headers and optionally, json content, using WinHTTP. I have tried solutions outlined in the questions here: WinHttpSendRequest failed with error code 87 WinHttpSendRequest returns…
Bruhman
  • 33
  • 6
1
vote
0 answers

How do I send an HTTP post request with headers and json data through a proxy with WinHTTP (C++)

I am attempting to send a post request like the one described in the title, but I cannot seem to find a good example of a generic piece of code. My work on my project is a bit tedious as I have never used WinHTTP, only libcurl before which is why I…
Bruhman
  • 33
  • 6
1
vote
0 answers

Retrieve a redirected URL using WinHttp in Excel VBA

Im looking to build a sub that can retrieve a redirected URL and place it in a cell. I have a range of cells containing numbers that complete a URL. This link is opened using WinHTTP and the file is then saved in PDF format. The returned page is a…
LIrahara
  • 41
  • 4
1
vote
0 answers

WinHTTP: how to force close connection?

When working with Binance REST API using WinHTTP, I noticed that requests sometimes are failed with the error 12030 the connection with the server was terminated abnormally Each request is made like this: (the complete example is…
1
vote
1 answer

VBA How To Loop Through JSON response from WinHttp.WinHttpRequest

I can't figure out how to properly loop through a JSON(Object) response from the WinHttp.WinHttpRequest that I am getting. Below are the References being used. I prefer to just keep it as is and use WinHttpRequest Dim response As Object '…
heisenberg
  • 1,784
  • 4
  • 33
  • 62