Questions tagged [winhttprequest]

WinHttpRequest COM object is a part of Windows HTTP Services (WinHTTP). It enables the use of WinHTTP from Visual Basic and script languages.

WinHttpRequest COM object is a part of Windows HTTP Services (WinHTTP). It enables the use of WinHTTP from Visual Basic and script languages.

Read the WinHTTP Reference.

177 questions
3
votes
1 answer

WinHttp.WinHttpRequest in .NET

Is there a built-in .NET class that can replace or work like WinHttp.WinHttpRequest? Thanks!
Leon Tayson
  • 4,741
  • 7
  • 37
  • 36
3
votes
1 answer

VBA to download csv file from a website with login and password

Ole Henrik Skogstrøm kindly posted a reply in the thread: "How do i download a file using VBA (Without internet explorer)". Have used his code as I wish to download a csv file from www.ft.com and save it to the temp file on my c drive. It is not…
Mark
  • 139
  • 3
  • 18
3
votes
1 answer

WinHTTP VBA subsequent request cannot use the previous login credentials?

I'm using WinHTTP in Access 2007 VBA to fetch some list of items requiring a cookie login credential account. First I login through https://www.example.com/login.php with this: Dim strCookie As String, strResponse As String, _ strUrl As…
jacouh
  • 8,473
  • 5
  • 32
  • 43
2
votes
4 answers

how to parse xml in from a WinHttp.WinHttpRequest object?

I have a standalone VBScript which connects to server and gets the response text(as XML) in a WinHttpRequest object. Now, my question is how do I parse the XML content in it. When I post a request(strPostData) I need to parse the response XML. What…
Srinivas
  • 545
  • 5
  • 9
  • 16
2
votes
1 answer

Work with WinHttpRequest.ResponseStream (related to IStream) in Classic ASP?

Is there a way to work with the ResponseStream property of WinHttp.WinHttpRequest.5.1 in VBScript/ASP? At least the IStream interface (to which ResponseStream is related) is integrated into ASP to a certain degree. Or is that the limit of what you…
Lumi
  • 14,775
  • 8
  • 59
  • 92
2
votes
0 answers

Numeric values of WinHTTP constants (eg. WINHTTP_NO_CLIENT_CERT_CONTEXT)

I need to set this property for a WinHttp request... BOOL fRet = WinHttpSetOption(hRequest, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, WINHTTP_NO_CLIENT_CERT_CONTEXT, …
Martin Holland
  • 291
  • 1
  • 14
2
votes
2 answers

Is WinHttpRequest.5.1 a good API for Windows 11 or does it require Iexplorer?

I am using this code to load files during setup, is WinHttpRequest.5.1 a good API for Windows 11 or does this API have some dependencies to Internet Explorer? function DownloadFile(const AURL: string; var AResponse: string): Boolean; var …
Tom
  • 6,725
  • 24
  • 95
  • 159
2
votes
1 answer

How to get the authorization code value from the redirect URI in VBA using XMLHTTP60 object?

I am trying to get the authorization code from my VBA macro as given here, https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online While I know a web page URL will get the code appended, I am…
codebug
  • 197
  • 1
  • 3
  • 15
2
votes
1 answer

VBA: Download a picture via HTTPS

I'm trying to download a picture from a website (Grafana monitoring tool, API) using VBA (MS Access 2016). It's a HTTPS address using a self signed ceritificat and requires username and password for authentication. I'm currently using the following…
ibkl
  • 43
  • 5
2
votes
1 answer

Session ID not refreshing in API call

I am trying to use VBA Excel to access the API provided by the website www.myfxbook.com. The API documentation is here(https://www.myfxbook.com/fr/api). The Steps to get the data are as follows: Login through Login API Get session ID of the session…
2
votes
2 answers

Problem adding JSON content to WinHttpRequest POST request in classic ASP

I am trying to retrieve data using an NHS API and the instructions are as follows... Endpoint https://api.nhs.uk/service-search/search?api-version=1 Method POST Headers Content-Type: application/json subscription-key: MYKEYHERE Body …
Shred
  • 45
  • 7
2
votes
0 answers

How to Use WinHttpRequest (WinHTTP Services) in Excel VBA to Stream Data from Websocket Server

I would like to stream data from a websocket server using VBA in an Excel workbook. This is the actual data stream I would like to receive and process in VBA: Would you recommend using WinHttpRequest (WinHTTP Services) or any other service to…
AlexR
  • 5,514
  • 9
  • 75
  • 130
2
votes
1 answer

WinHttp doesn't work when hostname doesn't contains www. (error 12029)

I am testing this winhttp example from http://msdn.microsoft.com/en-us/library/aa384270%28v=vs.85%29.aspx DWORD dwSize = 0; DWORD dwDownloaded = 0; LPSTR pszOutBuffer; BOOL bResults = FALSE; HINTERNET hSession = NULL, …
riviraz
  • 479
  • 1
  • 10
  • 22
2
votes
0 answers

WinHttpRequest fails with automation error but XMLHTTP60 works

I've been doing quite a bit of web scraping over the past year and at some point, for reasons I don't remember anymore, I decided to use the Microsoft WinHTTP Services version 5.1 library as my default solution when sending HTTP requests. I've…
Stavros Jon
  • 1,695
  • 2
  • 7
  • 17
2
votes
1 answer

Empty response of an HTTP post request in VBA

I am trying a make an HTTP post request in VBA but getting an empty response. Here is my code: Sub User() On Error Resume Next Dim HTTPreq As WinHttpRequest Set HTTPreq = New WinHttpRequest URL =…
Umar Aftab
  • 147
  • 4
  • 15
1
2
3
11 12