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

Clear "Temporary Internet Files" from a server

Basically I use http://support.microsoft.com/kb/326201 for clearing the cache. But in a article http://msdn.microsoft.com/en-us/library/windows/desktop/aa383990(v=vs.85).aspx it is mentioned that the above KB cannot be used from the server. They…
Karthikeyan
  • 136
  • 7
1
vote
1 answer

WinHTTP IWinHttpRequest iface - cookie handling - how to get cookies from response?

I'm using WinHTTP IWinHttpRequest object. I do POST to a https domain specyfying a request body with credentials. The site is expected to return cookies in HTTP response. The code works in Wininet - but I don't know how in WinHTTP to get cookies…
cubesoft
  • 3,448
  • 7
  • 49
  • 91
1
vote
0 answers

UnmapViewOfFile does not release file. Unable to access File after function is executed.

I am trying to upload a file to a cloud service using winhttp, however after running the below code, i am unable to access the same file anymore. It seems like the program is not closing its file handle properly: HANDLE hFile =…
mister
  • 3,303
  • 10
  • 31
  • 48
1
vote
1 answer

Progress indication with HTTP file download using WinHTTP

I want to implement an progress bar in my C++ windows application when downloading a file using WinHTTP. Any idea how to do this? It looks as though the WinHttpSetStatusCallback is what I want to use, but I don't see what notification to look…
Steve Middleton
  • 181
  • 4
  • 13
1
vote
1 answer

Reading response from proxy using WinHttpQueryHeader()

How to find out if the response is sent from the proxy or end-server by using WinHttpQueryHeader() function? I have tried using WINHTTP_QUERY_PROXY_AUTHENTICATE as the dwInfoLevel paramter to the function winHttpQueryHeader() but the buffer I got is…
1
vote
0 answers

WinHttp - option to specify the maximum number of requests to handle at a time

I use DWORD totalReq = 400; ::WinHttpSetOption(sessionHandle, WINHTTP_OPTION_MAX_CONNS_PER_SERVER, &totalReq, sizeof(totalReq)); in order to limit the total number of outstanding requests to a given server I can make at some time. What I want…
Ghita
  • 4,465
  • 4
  • 42
  • 69
1
vote
1 answer

Can't send Proxy credentials (407)

I am trying do code C++ program that connects with a proxy which needs password and username authentication (ip:port:username:pw) I got http working but when I am using https I always getting a 407 error. How do I send the proxy credentials on…
1
vote
1 answer

c++ winhttp/wininet wrapper to post forms and upload files without mfc/atl

could somebody point me to a winhttp/wininet based c++ wrapper which would not require mfc/atl? So that I might get it to work in MSVC express. I'd like to be able to use GET, POST and upload files too through HTML-form. I've checked several in…
user1412386
  • 31
  • 1
  • 3
0
votes
1 answer

How can I get response information from IE programatically?

I want to know what are different ways to get the response code information when we visit any page in IE by using Windows API or some interfaces using C++? I think some ways include 1)Using BHO: But I think that will give HTML information.Can we…
anand
  • 11,071
  • 28
  • 101
  • 159
0
votes
1 answer

WinHTTP Async Callback

I'm not very good in C++, you if you see something in the code fragment which could be better, please educate me! I'm implementing winhttp in an asynchronous fashion. But im having trouble retrieving the response. I cant figure it out. Because you…
Friso Kluitenberg
  • 1,157
  • 1
  • 14
  • 34
0
votes
1 answer

WinHttpOpenRequest with leading slash in pwszObjectName

When I use pwszObjectName with full net path: WinHttpOpenRequest(hConnect, L"POST", L"http:\\....... this function send to server not "http:\\..." but "\http:\\..." with leading slash. How can I delete this first slash?
theWalker
  • 2,022
  • 2
  • 18
  • 27
0
votes
1 answer

WinHTTP: using proxy with authentication

guys! I have to use proxy with authentication in my app where I connect to the server. (MFC app, WinHTTP lib). There is no problem to use simple proxy without username/pass. But how to specify auth method? I tried the following, but it didn't work…
Jeffrey Rasmussen
  • 367
  • 4
  • 8
  • 21
0
votes
2 answers

C++ WinHTTP API reading data

I'm trying to download data from a webpage then parse it, the problem is that I cant obtain the value of pszoutbuffer (ZeroMemory function deletes it) i took the code from MSDN example void http_connect::read_data(void) { // Keep checking for…
andrewmag
  • 252
  • 1
  • 4
  • 11
0
votes
1 answer

How to upload photo to Facebook via graph api

i am having a desktop application. My requirement is to upload photo to facebook using graph api. I am able to post message to user wall via application. But i am not able to upload photo. i am getting an error "EXPECTS UPLOAD FILE" . i went through…
user968341
  • 203
  • 2
  • 11
0
votes
1 answer

upload photo to facebook returning "expects upload file"

I am using the following code to upload photo to facebook hconnect = WinHttpConnect(hsession,L"graph.facebook.com",INTERNET_DEFAULT_HTTPS_PORT,0);`hrequest = WinHttpOpenRequest( hconnect, L"POST", reqUrl,NULL,…
user968341
  • 203
  • 2
  • 11