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

Continue WinHTTP connection after write shutdown

I'm using WinHTTP to send data to a web server script and in some cases I need the server to kill the incoming data (as it is not required) but still return a response to the client app. I'm using stream_socket_shutdown(STREAM_SHUT_RD) from the…
JWood
  • 2,804
  • 2
  • 39
  • 64
0
votes
2 answers

VBA Winhttp URL

I am using Winhttp in the following VBA code and can't get the URL to work, yet if I paste the URL into a browser it works fine. Any ideas would be appreciated: Sub WinHttp() Dim arr() As String Dim pos As Integer Dim used As Range Dim url, resp…
Bob
  • 101
  • 3
  • 13
0
votes
1 answer

http.sys and winhttp.dll have SSL/TLS "session resumption" and "false start"?

I have an application written in Delphi which attaches client-side winhttp.dll, on server side it uses mORMot (SOA/ORM client-server library which attaches "http.sys" for web server functionality). The next step will be also a web-client written in…
emk
  • 11
  • 1
  • 3
0
votes
1 answer

Bind HTTP connection to specific adapter (Hint: Metered Connection)

Windows 8 and above has setting to make a Wi-Fi (and other) connection to be metered (and have cost attached to it, but irrelevant here). I've used Native Wi-Fi API and WCM APIs to find required information. With sockets, it is possible to bind,…
Ajay
  • 18,086
  • 12
  • 59
  • 105
0
votes
1 answer

Download progress with WinHttp.WinHttpRequest.5.1

Is there a way to find out how much of a GET request has been received? I can't do Len(.ResponseBody) until it's complete, so that's not possible.
Hao Zhang
  • 147
  • 9
0
votes
1 answer

Set Cookie from response in WinHttp

I've a code that makes a post request to a server but I'm trying to set a Cookie from the response. (Just in case, I'm doing a request to a BurningBoard Login) Here you have my code: HttpsWebRequestPost("example.com", "/api.php?action=UserLogin",…
Jose
  • 129
  • 2
  • 4
  • 9
0
votes
2 answers

WinHTTP and Websocket

I am trying to use WinHTTP to connect to server, unfortunately when i am trying to upgrade the protocol from http to webscoket, the API WinHttpSetOption fails. hSessionHandle = WinHttpOpen(L"WebSocket sample",WINHTTP_ACCESS_TYPE_NO_PROXY,NULL, …
Sukhas
  • 89
  • 1
  • 8
0
votes
1 answer

How do I accomplish a client-authenticated HTTPS POST within VBA when server uses self-signed certificate?

The functional requirements are these: Use HTTP POST to transmit data from "content controls" within Word to an Apache website outside the corporate firewall when the user clicks a button. The external website is controlled by me and is in the…
0
votes
0 answers

Download Binary File using WinHTTP.WinHTTPrequest with SSO Authentication, No Password, Multiple Redirects

Using VB and WinHTTP.WinHTTPrequest.5.1, I need to automate the download of a binary file for users that resides on a network share, requiring SSO authentication, without hardcoding or requiring a user to enter their password. I have been reviewing…
0
votes
0 answers

web host returned ERROR_WINHTTP_INVALID_SERVER_RESPONSE

I am hosting a website on a webhost for a game. I wanted to test if my webhost could handle the ammount of requests my game would make. So I created a script that would send 500 requests per minute to my website. It seemed to handle everything…
Joas
  • 11
  • 5
0
votes
0 answers

HTTP request in DLL returns nothing

I'm trying to get a request from a DLL (which is hooked into a program) but no matter what I try, everything just hangs. I tried to use CURL and WinHttpClient. Both did the same thing but slightly differently. CURL made the program hang for a long…
Raymonf
  • 114
  • 1
  • 16
0
votes
1 answer

Wrong String parameter when sending a json string as a post request

I used this code for my Macro in VBA in excel: Sub Macro1() Dim URL As String, JSONString As String, objHTTP As Object Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") URL = "xxxxx" objHTTP.Open "POST", URL, False objHTTP.setRequestHeader…
Long
  • 1
  • 1
0
votes
2 answers

Windows C++ Should I use WinHttp library or XmlHttp from MSXML?

A rather simple question. Should I use the WinHttp library to make a web service request in my C++ programs or should I use the IXmlHttpRequest interface in the msxml library to send web service requests? Obviously the WinHttp library provides a lot…
jmucchiello
  • 18,754
  • 7
  • 41
  • 61
0
votes
1 answer

Trying to resolve ambiguity concerning SECURITY_FLAG_STRENGTH_* flags

I'm using WinHttp and WinHttpQueryOption API in particular to ensure that my connection employs strong https encryption. For that I'm doing the following: DWORD dwHttpSecurityFlags = 0; DWORD dwcbSzSec =…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
0
votes
2 answers

Setting useUnsafeHeaderParsing for C++ WinHttp

I'm trying to reach a web page on an embedded device. I'm using WinHttp on Win32. When trying to read response I get error ERROR_WINHTTP_INVALID_SERVER_RESPONSE 12152 The server response cannot be parsed. But when I captured with WireShark I…
AFgone
  • 1,172
  • 4
  • 16
  • 31