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
2
votes
2 answers

WinHTTP stops downloading after 8 KiB

I'm downloading .jar files from libraries.minecraft.net and repo1.maven.org using WinHTTP (over HTTPS). Here's the function: // Namespace alias, all stdfs mentions in the function refer to std::filesystem namespace stdfs = std::filesystem; bool…
Kotauskas
  • 1,239
  • 11
  • 31
2
votes
2 answers

What is the correct line delimiter to post multiple measurements to influxDB via WinHttpRequest?

I want to post multiple lines (measurements) of a timeseries to InfluxDB with precision in seconds (precision=s) via VBA and the WinHttp library. When one measurement is posted everything works fine and the measurement can be found in the db. When…
LuTei
  • 25
  • 4
2
votes
0 answers

How to download file from secure website with WinHTTPRequest.5.1

I'm trying to download files(PDFs) silently from a website with VBA. So far I login without issue entering UserName & Password on the initial screen, navigate to the reports page within the site, get my list of files successfully in a table. I get…
Jim Carney
  • 87
  • 2
  • 10
2
votes
0 answers

C++ Expected a ';' error in code

I am really confused why i get the following error expected';' on hSession on line 13. I am not missing any semi-colons so im confused as to what this error means on my code: #include "stdafx.h" #include #include #include…
jimmy
  • 73
  • 1
  • 7
2
votes
2 answers

Cannot build with include Winhttp to Windows XP (v141_xp)

I am using Virsual Studio 2017 and working on Win7 system, I having following code that using Winhttp: #include "stdafx.h" #include #include #pragma comment (lib, "Winhttp.lib") int main(int argc, char *args[]) { return…
Moon soon
  • 2,616
  • 2
  • 30
  • 51
2
votes
1 answer

winhttp WINHTTP_CALLBACK_STATUS_FLAG_SECURITY_CHANNEL_ERROR

I am using Casablanka Rest SDK with Visual C++ 2015. The Casablanka SDK is based on winhttp. Whenever a request is sent over SSL, an exception is received. The exception is: "SSL error: WINHTTP_CALLBACK_STATUS_FLAG_SECURITY_CHANNEL_ERROR internal…
2
votes
0 answers

WinHttpSendRequest does not send body data

Hello I'm using the WinHttpClient.h and I want to send some POST data in a body to the server, at the moment it only sends the parameters (REST) of the POST request, can you please tell me what can be the problem that the POST body is empty? Thank…
Mr. Hello_world
  • 85
  • 2
  • 10
2
votes
1 answer

Allow winhttp delegation without Active Directory trust

I am developing an application using kerberos authentication in a double-hop scenario : the client is connecting to a server witch needs to use the client's credentials to connect a SQL server. I already did it using GSoap and GSS-API from kerberos…
H. Gybels
  • 147
  • 1
  • 1
  • 11
2
votes
1 answer

Using "setClientCertificate" when there are multiple certificates installed

I wrote a WinHttp POST request in VBA. It works good as long as there is only one certificate installed on the computer. However, some users have multiple certs with similar certificate names and therefore it returns an error: a certificate is…
guice99
  • 55
  • 9
2
votes
1 answer

VBA setRequestHeader "Authorization" failing

I am trying to connect to a Web Database with the following code, but it does not seem to work when automated in VBA. The login and password are fine as I can connect manually with them. is it possible that the Object: "WinHttp.WinHttpRequest.5.1"…
Patrickll
  • 21
  • 1
  • 1
  • 5
2
votes
2 answers

Application Needs Fiddler to Execute Properly on Some PCs

I have a VB6 application that only runs under certain conditions. When it fails (on the send statement below), it generates a Run-time error '-2147012867 (80072efd)': A connection with the server could not be established The funny thing is that it…
WindsorRick
  • 205
  • 1
  • 2
  • 7
2
votes
1 answer

Is there a standard Windows dialog for obtaining the proxy username and password?

I'm using WinHTTP to write an an app that needs access to the internet, and is potentially behind a proxy. Everything works (almost) out of the box is the user is on a domain, but if he or she isn't then I need a way to ask for credentials. Is there…
Pedro d'Aquino
  • 5,130
  • 6
  • 36
  • 46
2
votes
0 answers

Windows SDK Troubles

The Background: I'm trying to write a windows program to serve as a client-side HTML viewer. Since the development IDE that I'm using (Code::Blocks v:13.12) doesn't come with a copy of winHTTP.lib, I had to download a copy of the Windows 10 SDK. I…
user5739133
2
votes
2 answers

Code to send an HTTP request through a proxy using WinHttp

I am using the Winhttp.lib library to send an HTTP request in C++ to a remote server. On the client side, the HTTP request has to be sent to a proxy which IP is W.X.Y.Z and which port is 1234. According to the prototype of the function WinHttpOpen()…
Léa Massiot
  • 1,928
  • 6
  • 25
  • 43
2
votes
0 answers

using winhttp to connect to a multihomed host when the first ip is bad

im trying to confirm that the feature described here: http://msdn.microsoft.com/en-us/library/aa384066(VS.85).aspx WINHTTP_OPTION_CONNECT_RETRIES Sets or retrieves an unsigned long integer value that contains the number of times WinHTTP…
josh
  • 1,231
  • 1
  • 12
  • 28