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

How to avoid Infor XA System Link WinHTTP wildcard error?

I am running a system link between Excel and Infor XA using WinHTTP. This works fine until I try to do a system link to find values that begin with something. So using the wildcard of % as shown below item LIKE 'T1234%'. Note I have removed all…
0
votes
0 answers

How to set a timeout on WinHttpWebSocketReceive

Is there a way to set a receive timeout on (synchronous) calls to WinHttpWebSocketReceive? I've tried WinHttpSetTimeouts but that doesn't seem to work.
Stijn Sanders
  • 35,982
  • 11
  • 45
  • 67
0
votes
0 answers

Trying to Connect client with SSL server get wrong error code

I am trying to connect with a client using SSL, with a code similar to (simplified): session = WinHttpOpen(L"test", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); DWORD secure_protocols =…
Zhen
  • 4,171
  • 5
  • 38
  • 57
0
votes
1 answer

Why would applications fail on calls to WinHttpOpen with WINHTTP_FLAG_SECURE_DEFAULTS set on Windows Server 2019 and older?

Given a simple test application that simply calls WinHttpOpen() as follows and does nothing else: WinHttpOpen(userAgent, WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, WINHTTP_FLAG_ASYNC |…
Ian
  • 143
  • 2
  • 11
0
votes
0 answers

image download(crawling) by using winhttp in VBA

I'm trying to download(crawling) image in VBA. I'm using "winhttp" for this. Public Function WebFileDownload(ByVal strURL As String, ByVal strFileName As String) As Boolean Dim Buf() As Byte, oWinHttp On Error GoTo Err_Sub Set oWinHttp…
zerom
  • 3
  • 3
0
votes
0 answers

WinHttp websockets listener

I am trying to develop a WebSockets client in C++ using WinHttp. I am making very slow progress (I am .NET developer). I have my WS server developed in .NET 6 and now I am working on a C++ console app that connects to the server and listens for…
Dimt
  • 2,278
  • 2
  • 20
  • 26
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
1 answer

WinHttpSendRequest returns 12044 ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED

since 3 years I acces the ebay api from WinHttp. Since today I get error 12044, ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED, after calling WinHttpSendRequest. May I use whatever SSL certificate and load it from the store? Getting one from letsencrypt.org,…
Dirk10000
  • 1
  • 3
0
votes
1 answer

HttpAddUrlToUrlGroup failing when run in normal user privilege

I am trying to create a server application using HTTP Server API (https://learn.microsoft.com/en-us/windows/win32/http/http-server-api-overview). I am unable to run the application with regular user privilege. From the command prompt in…
0
votes
0 answers

Proxy Downloader using WinHttp in cpp

I am new to c++ but have managed to write the following code using microsoft documentation / looking at online examples / borrowing some code. I want this code to be process agnostic ie able to be run in the context of a user or as a service with or…
hungli
  • 1
  • 1
0
votes
0 answers

Internal Server Error when making POST request (traced to Content-Length, but unable to debug)

I have a Windows application that makes a POST request using WinHTTP. It sends some custom headers and a CSV file in the body of the request. It has been working fine when sending the request to localhost (http://127.0.0.1), but the remote server…
Elliot
  • 63
  • 1
  • 6
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
0 answers

WinHttp library requesting TLS 1.2 support only, remote system denying SSL3 connection

My code requests only TLS 1.2 secure protocol use but for some reason the remote is receiving an SSL 3.0 handshake according to the wireshark trace. The remote host denies the connection because TLS 1.2 is required by the server. DWORD dwOption =…
jmucchiello
  • 18,754
  • 7
  • 41
  • 61