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

Posting using WinHttpSendRequest

How do you create a form to post using WinHttpSendRequest? For example: if I know name=Johnson; subject=Hi; message=Hi; How do i send it using the function?
Johnson
  • 11
  • 1
  • 2
1
vote
1 answer

WinHttpWriteData completion

I'm using WinHTTP to transfer large files to a PHP-based web server and I want to display the progress and an estimated speed. After reading the docs I have decided to use chunked transfer encoding. The files get transferred correctly but there is…
1
vote
1 answer

Two threads using the same websock handle- does it cause any issue?

We are having a C++ application to send and receive WebSocket messages One thread to send the message (using WinHttpWebSocketSend) the second thread to receive (using WinHttpWebSocketReceive) But the same WebSocket handle is used across these 2…
Sukhas
  • 89
  • 1
  • 8
1
vote
1 answer

WinInet : How to send multiple http get request with C++

I'm trying to write a program that download some things from a remote server, #include #include #include #include #pragma comment(lib,"wininet.lib") using namespace std; string Get(){ DWORD size =…
1
vote
0 answers

WinHTTP Send() with parameters

I have a list of inputs to be sent as part of a HTTP POST request. I am searching for an AutoIt equivalent to encapsulate this data. Below code is failing with 400 - Bad Request for incomplete input (unable to send ip_list and other array type…
Siva
  • 294
  • 1
  • 9
  • 25
1
vote
0 answers

NTLM Proxy with WinHTTP and Squid

We have a SQuid Proxy setup on Windows Server with NTLM authentication helper (mswin_ntlm_auth). WinHTTP authentication as described in https://msdn.microsoft.com/en-us/library/windows/desktop/aa383144(v=vs.85).aspx is not getting passed and server…
Priyank Jain
  • 107
  • 1
  • 5
1
vote
0 answers

WinHttp causes ERROR_INTERNET_OPERATION_CANCELLED

I'm playing around in C++ with WinHTTP. I made an API in C# which I'm trying to call from C++, for this I'm using WinHTTP. The API is hosted on a local server with SSL active, the root certificate is also trusted. I made a sample application to go…
Lennard Fonteijn
  • 2,561
  • 2
  • 24
  • 39
1
vote
1 answer

How do I get the request headers of a WINHTTP request?

I need to be able to log the outgoing request, which I am sending using winhttp. Everything else is easy to get (status code, content, response headers, etc) but there appears to be absolutely no way to see what winhttp is actually sending in the…
Kenny Ostrom
  • 5,639
  • 2
  • 21
  • 30
1
vote
1 answer

is WinINET reentrant?

I see that WinHTTP is not reentrant (1,2). Is WinINET reentrant? We have an ActiveX control that does synchronous HTTP with WinINET. If the browser (in javascript) fires an asynchronous http request (ajax) and then immediately calls the ActiveX…
Dustin Getz
  • 21,282
  • 15
  • 82
  • 131
1
vote
1 answer

Inno Setup Exception is not caught

I am using a domain with an untrusted TLS (SSL) certificate so I could debug something. This is my code: procedure test(); var WinHttpReq: Variant; begin WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1'); try …
yuval
  • 2,848
  • 4
  • 31
  • 51
1
vote
1 answer

Win32 WinHttp: Correct way to query custom response header?

I want to query ETag header from response headers (Of course ETag is HTTP standar, but it is not defined as a flag in WinHttpQueryHeaders function). this is Microsoft's example: HRESULT ReadHeader( __in HINTERNET requestHandle, __in_z…
NoName
  • 7,940
  • 13
  • 56
  • 108
1
vote
1 answer

WinHttp Gets 404 File Not Found

I am grabbing a webpage with WinHttp and the resulting page is the site's 404 file not found page. I know that the code works as I have tested it with other websites. The page in question is a normal http protocol and .html file. What can I do?
Evan
1
vote
1 answer

Send WinHTTP request using current user credentials

According to MSDN, WinHttpSetCredentials requires you to specify the exact username and password. Is there a way to use current user credentials? Without needing to specify the username and password, that is. When I send the request, I get a 401…
Yehuda Shapira
  • 8,460
  • 5
  • 44
  • 66
1
vote
1 answer

Set IP preference in WinHTTP (c++)

I have a code that is using WinHTTP on Windows 7. The problem i'm experiencing is that the connction to specific hostname takes a long time when the user tries to use an IPv6 address (that is disabled). I want to configure the connection (maybe…
Tom
  • 323
  • 1
  • 6
  • 12
1
vote
1 answer

Download Embeded PDF file using VBA

I have word document containing hyperlinked text. I want to go to that page and check if there is any embedded pdf. If there is I want to download the PDF Hyperlink looks like…
Rahul
  • 10,830
  • 4
  • 53
  • 88