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

Certificate pinning with WinHTTP API

Is it possible to implement certificate pinning using the Win32 WinHTTP API, and if so how? I.e. how can I check the returned server certificate against a 'known good' one, preferably without having to permanently write the cert into the local…
snowcrash09
  • 4,694
  • 27
  • 45
5
votes
2 answers

WinHTTP issue when uploading files

After spending days hitting my head to the wall I thought I'd ask here. The problem with the below code is that I'm basically iterating a directory, uploading the files there. All the files are small, ~1KB in size so this is not a size issue. The…
TJK
  • 91
  • 1
  • 6
5
votes
2 answers

Creating robust HTTP connection for dummy users with WinINET

I'm making a program which downloads a simple file from internet on Windows, using Wininet family API because I want to utilize its IE-compatible proxy behavior. As you all know, current IE has several proxy settings: auto-detect (WPAD),…
Francis
  • 11,388
  • 2
  • 33
  • 37
5
votes
1 answer

How to make WinHttpCrackUrl work in 64-bit

I have Visual Basic for Applications code that uses WinHttp and works flawlessly with 32-bit Office 2010 running on 32-bit Windows XP. The same code fails to run properly on 64-bit Office 2013 on 64-bit Windows 8, even though it compiles fine. The…
bovender
  • 1,838
  • 15
  • 31
4
votes
3 answers

How to use "WinHttp.WinHttpRequest.5.1" asynchronously?

The code: var WinHttpReq: OleVariant; procedure TForm1.Button1Click(Sender: TObject); begin WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1'); WinHttpReq.Open('GET', 'http://stackoverflow.com', TRUE); // asynchronously …
kobik
  • 21,001
  • 4
  • 61
  • 121
4
votes
2 answers

Wcf service works in .NET Core 3.1 console app, but fails to work in ASP.NET Core 3.1 Web API

Running into a peculiar issue at work. Trying to connect to an https, custom client certificate based connected service. I'm using BasicHttpsBinding and ChannelFactory classes to create a client for the service. Able to connect to the service and…
4
votes
1 answer

In WinHTTP, what settings should be used to pass Common Criteria TLS_EXT1.1 tests

My team is working on common criteria validation of one of the clients' products written in Delphi for Windows. The application uses winhttp api for making HTTP requests. We are using tls-cc-tools for checking whether the application passes all the…
Shahbaz Shueb
  • 410
  • 4
  • 9
4
votes
1 answer

WinHttpRequest POST

I'm trying to read data from my online mySQL server using WinHttpRequest in VBA. Dim objHTTP As New WinHttp.WinHttpRequest With objHTTP .Open "POST", "http://www.dname.com/ruski/php/getNewestPID.php", True .SetRequestHeader "Content-Type",…
user3305711
  • 441
  • 5
  • 16
4
votes
0 answers

Delphi System.net.HTTPClient broken filestream after disk idle

This is a Delphi class, based on System.net.HTTPClient with a function for downloading a file from a URL and saving on a filename destination: function Download(const ASrcUrl : string; const ADestFileName : string): Boolean; The main feature is the…
ar099968
  • 6,963
  • 12
  • 64
  • 127
4
votes
2 answers

Is there way to get the final URL after redirects using WinHTTP in Delphi?

I can use the following code to easily get the HTML source from the URL, but how can I get the actual URL itself? Because sometimes the initial URL goes through some redirects and the actual URL is not the same and I would like to capture it for…
gts6
  • 41
  • 2
4
votes
1 answer

How do I upload a zip file via HTTP post using VBA?

This question has been asked many times by others in some form or another but most remained unanswered or the given answer is "Use C#, duh!", which incidentally, is a non-answer. ;-) I want to upload a zip file to a web server via VBA. The server…
GeneQ
  • 7,485
  • 6
  • 37
  • 53
4
votes
4 answers

WinHTTP.WinHTTPRequest.5.1 does not work with PayPal sandbox after TLS 1.2

PayPal sandbox just recently restricted to TLS 1.2 connection. This makes our site stop working with PayPal sandbox although it stills work with the production PayPal. In the future the production PayPal will have the same restriction. We're…
Phong
  • 66
  • 1
  • 1
  • 6
4
votes
2 answers

WinHttpRequest timeouts

I'm using AHK script to send some POST requests. I'm trying to get a timeout response so I can popup some message to the user. I cant figure out how to use the "SetTimeouts" method and the "WaitForResponse" See code below WebRequest :=…
bardalas
  • 81
  • 1
  • 1
  • 10
4
votes
1 answer

winHTTP GET request C++

I'll get right to the point. This is what a browser request looks like GET /index.html HTTP/1.1 This is what winHTTP does GET http://site.com/index.html HTTP/1.1 Is there any I can get the winHTTP request to be the same format as the regular…
Ilia Choly
  • 18,070
  • 14
  • 92
  • 160
4
votes
1 answer

ValueError: NULL COM pointer access

I am trying to extend the azure WinHttpRequest python binding to be able to modify the request options. Ideally, I'd simply like to set the global options through winhttp.dll WinHttpSetOptions function, but I can't quite figure out how to do that. …
Craig
  • 4,268
  • 4
  • 36
  • 53
1 2
3
27 28