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

Send data using WinHttpClient and https c++

I have a c++ application that sending data using http with WinHttpClient and i want to start sanding https bool ret = false; WinHttpClient client(wstring(url.begin(), url.end())); ret = client.SetAdditionalDataToSend((BYTE *)data.c_str(),…
1
vote
0 answers

Set cipher suites used by WinHTTP

I would like to use WinHTTP to verify the correctness of some cipher suites which are a modified version of OpenSSL ciphers. However, I am not able to force WinHTTP to use a specific cipher when contacting a TLS/SSL server. I tried a couple of…
feeling_lonely
  • 6,665
  • 4
  • 27
  • 53
1
vote
0 answers

Inno Setup, WinHttpReq request through proxy server with PAC url

I am currently trying to write a service in Pascal that allows my installation in Inno Setup to communicate through a proxy server. I was able to do it with a host and port number, but now I need it also to implement recorring to a PAC file. I just…
Joao
  • 15
  • 4
1
vote
1 answer

Prevent winHTTP From Writing to STDOUT

I've taken the following code from a previous SO post: //Variables DWORD dwSize = 0; DWORD dwDownloaded = 0; LPSTR pszOutBuffer; std::vector vFileContent; BOOL bResults = FALSE; HINTERNET hSession = NULL, hConnect =…
1
vote
2 answers

WinHttpOpenRequest & Unreachable Destination

I'm testing winHTTP out and I've noted that regardless of the timeout values set via WinHttpSetTimeouts, if using an IP address with WinHttpConnect and the IP address is unreachable (i.e. a ping returns "Destination Host Unreacheable"), the timeout…
Gavzooka
  • 57
  • 1
  • 9
1
vote
1 answer

How to resolve HTTPS status code 404?

I am getting status code 404 for the below code snippet. Note: please add when you are trying to figure out the issue. HINTERNET m_hConnect; HINTERNET m_hSession; …
Siva
  • 1,281
  • 2
  • 19
  • 41
1
vote
1 answer

Invoking a RESTFul WebService using WinHttp

I am totally new with VB6 and REST architecture. Nevertheless I would like please to know if there is any HelloWorld example for a REST Client which invokes a RESTFul webService using Windows HTTP Services API. Many thanks in advance.
sasuke
  • 145
  • 1
  • 10
1
vote
1 answer

Sending mouse position over internet

How to send mouse position from client A =to=>SERVER=to=>client B ? Example code below gives me position output every 2 seconds What is a better/faster way to do this? NOTICE: using Winsock and cURL gives antivirus malware warning USAGE: for…
Ivan
  • 131
  • 7
1
vote
1 answer

WScript.CreateObject crashes Windows Scripting Host when event handler prefix is specified for WinHTTPRequest

According to the MSDN documentation WinHTTPRequest has four event handlers which should be accessible by specifying an event handler prefix. Unfortunately, doing so causes Windows Scripting Host to crash. The following code crashes Windows…
1
vote
1 answer

Methods to limit bandwidth usage with WinHTTP APIs

I'm using WinHTTP APIs in a C++ code similar to the one at the bottom of this article. It runs from my Windows service, and is used to download updates in the background. The code works fine, except that I've received complaints that when it is…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
0 answers

Using VBScript to POST API call

I am not sure what I am missing. I am trying to make a call to get a token returned via API. I need this token to do further calls - like create users, etc. Anyway, if I a similar call using GET to find the status, it works. Also, if I use the…
James Craig
  • 473
  • 3
  • 9
  • 22
1
vote
0 answers

How do I configure WinHTTP Tracing programmatically?

I have a C application (not C++ or C#) that tests connectivity to our API from a client's perspective using WinHTTP. Here's code that downloads a file. DWORD Measure(FILE* fout, LPCTSTR lpszUrl) { int i; DWORD dwResult = 0; DWORD…
bloudraak
  • 5,902
  • 5
  • 37
  • 52
1
vote
1 answer

VBA for "HTTP GET" request, through an unknown proxy?

Put simply, I'm trying to write some Excel VBA code that will "notify" a web server when a specific task is successful. I am thinking the easiest way to interface with my web server is via an "HTTP GET" request. Assuming that to be true, I have had…
Simon
  • 567
  • 5
  • 14
1
vote
2 answers

Call server with WinInet and WinHTTP

I have a request that works fine when I use the WinInet API. I now want to make that request with the WinHTTP API as I already use it in my project and as it is simply better. My request is used for calling JSON. I already authenticated before…
Simon Linder
  • 3,378
  • 4
  • 32
  • 49
1
vote
1 answer

How to get description of winhttp errors using error codes?

I am making a program that uses winhttp library. To handle various exceptions, I have created a header file. The error is thrown by using GetLastError() function which is passed to the exception class as DWORD variable. But I want to print the…