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

Use win32 libs in cmake project

I'm trying to build a cmake project that uses WinHTTP. Below is my cmakelists.txt file cmake_minimum_required(VERSION 3.19) project(Mandarin_EXE_Updator) set(SOURCE_FILES main.cpp) set(WIN32 True) OPTION(WINHTTP…
0
votes
1 answer

ERROR_WINHTTP_NAME_NOT_RESOLVED when using dbghelp as a service

I am trying to setup a symbol proxy server that targets both our own internal symbol stores (UNC) and http servers (microsofts being one). I want it to run as a service, or as IIS (which runs as a service of course). I have tried Micrsoft SymProxy,…
billw
  • 120
  • 1
  • 9
0
votes
2 answers

Call to WinHttpCreateUrl with ICU_REJECT_USERPWD flag set working in Windows 7 but not Windows XP (using Virtual PC)

I've been getting unexpected errors when running the app I'm developing in Windows XP (under Virtual PC from Windows 7). I'm compiling it using Visual Studio 2010 in Windows 7 64-bit Professional. I've tracked the problem down to URLs not being…
Rok
  • 2,568
  • 4
  • 26
  • 28
0
votes
0 answers

WinHTTP returns error 122 when connecting to proxy

I am attempting to connect to a proxy using WinHTTP. However, the output says "Error 122 in WinHttpQueryOption." I'm not sure why this is. "proxy" is just an std::string like "21.169.73.65:34679". The problematic code is below. std::wstring…
Bruhman
  • 33
  • 6
0
votes
0 answers

Can a WinHTTP server handle clients in seperate thread just like Winsock

Objective I'm writing an HTTP server in C++17. For the sake of the discussion, I reduce the requirements to: Simple HTTP Echo Server. Expects multiple clients. Clients constantly send simple GET requests. Handle each client in a separate…
idanshmu
  • 5,061
  • 6
  • 46
  • 92
0
votes
0 answers

winhttp and visual studio code - complete newb and issue with 'undefined references' when building

I have about 20 years of php, js, css, html, xml, etc (all the web stuff), but nothing in C++ - complete newbie here. I pick up code quick, but do best with working examples that I can 'play' with to understand better. I have VS Code installed, the…
user756659
  • 3,372
  • 13
  • 55
  • 110
0
votes
2 answers

Downloading an executable (.exe) in C using WinHTTP

I'm trying to download an executable from a HTTP web server in C using WinHTTP. The code below works perfectly with HTML files, but when I try to download an executable (.exe) it does only download a part of the file (and the amount of downloaded…
Louis Bernard
  • 229
  • 4
  • 20
0
votes
1 answer

Why WinHttp does not send client certificate with chain?

I am working on a client-server application where server is web service which perform client authentication based on SSL client certificate. The client cert is issued by Root-CA -> Intermedia-CA-1 -> Intermedia-CA-2. I imported the cert to both user…
justin
  • 1
  • 1
0
votes
1 answer

WinhttpReadData slow network

I am downloading an exe from the server using Winhttp C++. I use the sample code provided in MSDN http://msdn.microsoft.com/en-us/library/aa384104%28v=vs.85%29.aspx It works fine.I normally used to add up all the data read (Read from…
user738471
  • 879
  • 1
  • 8
  • 10
0
votes
1 answer

Send an array string inside POST Request VBA Excel

I'm trying to send a post request to an API that takes an array of strings as an argument. It comes out an error specifying that the types are not allowed and when the request is sent correctly all the data is left in the first position of the array…
dvque
  • 469
  • 4
  • 13
0
votes
0 answers

WinHttp GET request over HTTPS & TLS1.2 failing

I'm observing an odd failure of an HTTP GET request sent using WinHTTP in a VBA MS Access application running on Windows Server 2016, but which works fine in Windows 10... With New WinHttp.WinHttpRequest .Open "GET",…
FrugalTPH
  • 533
  • 2
  • 6
  • 25
0
votes
0 answers

How to connect C++ HTTPS Client using WinHTTP to Python HTTPS Server

I am trying to establish a HTTPS connection between my HTTPS python server to my HTTPS c++ client. I tested the server using a browser and it worked fine, but I am having trouble with the winhttp library of the c++ client and I can't establish a…
SH22
  • 21
  • 1
  • 5
0
votes
1 answer

WinHTTP5.1 & Delete Google Calendar Event?

I can't fathom what I'm doing wrong here. I can successfully add a calendar event with "POST" & json data. But I cannot understand what I am doing wrong when it comes to deleting it. I am getting error 401 but I know for a fact I am 100%…
Stavros
  • 23
  • 1
  • 5
0
votes
2 answers

Visual Studio release mode blocks code execution that is executed in debug mode. Using WinHTTP and Multi-Threading

I'm using WinHTTP to make a GET request and I'm using WinHttpOpen asynchronously with a callback function. HINTERNET hSession = WinHttpOpen(L"", WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, WINHTTP_FLAG_ASYNC); if…
0000
  • 1
  • 1
0
votes
0 answers

Why WinHttp return me the error "A certificate is required to complete client authentication"?

I need to access https://api-sandbox.direct.yandex.com/json/v5/campaigns via WinHttp. Problem is that from a webbrowser it's work fine, but from WinHttp it's failed with "A certificate is required to complete client authentication". I m under delphi…
zeus
  • 12,173
  • 9
  • 63
  • 184