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

How do I use the winhttp api with "transfer-encoding: chunked"

I'm trying to send some data to a web service which requires the "Transfer-encoding: chunked" header. It works fine with a normal POST request. But as soon as I add the header, I always get: The content could not be delivered due to the following…
sph
  • 71
  • 7
6
votes
1 answer

WinHttp POST body not received

I'm sending a WinHttp request with POST data to a php script on an IIS7 server, and the POST body isn't being received by the server. If I send via WinHttp using GET, or POST with a NULL body, or through an HTML form using POST with a body,…
Cannos
  • 61
  • 1
  • 2
6
votes
1 answer

Are there any complete examples of using winhttp in C on windows?

I can find tons of examples in C++, but nothing that's written in just C. I am trying to connect to an http server, download the returned data, and then save it to a file. Is there a better way to do it on Windows? Should I not be using WinHttp or…
jacortinas
  • 313
  • 3
  • 8
6
votes
0 answers

WinHttp Async Timeout issue

I am trying to use WinHTTP C++/Windows API in order to connect to multiple Http servers. Before switching to WinHTTP, i tried using HttpClient C# 4.5 in async manner, however i did not get high throughput and the CPU was too high. On WinHTTP, a…
Shadi
  • 231
  • 1
  • 2
  • 7
6
votes
1 answer

VBA WinHTTP to download file from password proteced https website

I'm trying to save a file from https password protected site using WinHTTP. Here's the code: Sub SaveFileFromURL() Dim FileNum As Long Dim FileData() As Byte Dim WHTTP As Object fileUrl = "https://www.website.com/dir1/dir2/file.xls" filePath =…
user2267971
  • 373
  • 1
  • 4
  • 12
6
votes
1 answer

How do I prevent ServerXMLHTTP from automatically following redirects (HTTP 303 See Other responses)?

I am using ServerXMLHTTP to perform an HTTP POST. The response returned is a redirect (specifically 303 See Other). ServerXMLHTTP is automatically following this redirect but this is causing an authentication failure as is not propagating the…
Matthew Murdoch
  • 30,874
  • 30
  • 96
  • 127
5
votes
4 answers

How to make a POST request to a page that may redirect to a login page

I am using a macro in Outlook VBA to submit a file via POST to a URL: Set http = New WinHttp.WinHttpRequest http.Open "POST", UrlToPostTo, False 'True ' http.setRequestHeader "User-Agent", "Mozilla/4.0…
MGOwen
  • 6,562
  • 13
  • 58
  • 67
5
votes
4 answers

Multithreaded WinHttp downloads

I am creating a Delphi application to download files from the Internet and if the server supports range requesting it will be multi threaded. The progress is also relayed back to the GUI. The current software model uses TThread components. The GUI…
Hzmy
  • 769
  • 7
  • 16
5
votes
0 answers

netsh winhttp does not appear to work. Any suggestions why?

I have windows 10 enterprise and when I use this command to set proxy : netsh winhttp set proxy proxy-server="socks=89.42.198.79:47570" I get this output : Current WinHTTP proxy settings: Proxy Server(s) : socks=89.42.198.79:47570 Bypass…
Ali Akhtari
  • 1,211
  • 2
  • 21
  • 42
5
votes
1 answer

Clarify usage of WINHTTP_STATUS_CALLBACK function, for SSL status codes

I'm writing some WinHttp code in C. I'm sending requests over SSL, and in order to handle SSL errors, I'm registering a WINHTTP_STATUS_CALLBACK function, via a call to WinHttpSetStatusCallback with dwNotificationFlags set to…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
5
votes
3 answers

Posting form using WinHttp

Do i need to add any headers before making a post to server? For example, Currently I'm trying to send a request along with the post data this way, LPCWSTR post = L"name=User&subject=Hi&message=Hi"; if (!(WinHttpSendRequest( hRequest, …
user963241
  • 6,758
  • 19
  • 65
  • 93
5
votes
1 answer

SSL handshake failure Server [FIN, ACK] after Client Hello

Our company currently have an application created in VB6 running on a Windows 7 desktop computer. This application needs to connect to a web service using HTTPS. For some reason this application can not connect to the target server. The target…
Jefrey Valencia
  • 713
  • 3
  • 13
  • 30
5
votes
3 answers

WinHttp doesn't download from Amazon S3 on WinXP

Recently Amazon has disabled support of SSL for S3 buckets and it seems it causes problems on Win XP SP3. I use this code hSession = WinHttpOpen(L"MySession", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, …
Sergi0
  • 1,084
  • 14
  • 28
5
votes
1 answer

How to enforce tls 1.x using wininet

I'm using wininet library in my aplication, after it turned out that sslv3 loooves poodle, some websites turn it off, and my aplication does not working on some PC's unless user set in Internet settings in windows to use TLS 1.X. Does anyone know…
whd
  • 1,819
  • 1
  • 21
  • 52
5
votes
1 answer

HttpAddUrl permissions

I'm trying to run a custom WinHTTP based web-server on Windows Server 2008 machine. I pass "http://*:22222/" to HttpAddUrl When I start my executable as Administrator or LocalSystem everything works fine. However if I try to run it as NetworkService…
Ghostrider
  • 7,545
  • 7
  • 30
  • 44
1
2
3
27 28