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
1
vote
1 answer

WinHttpRequest upload file

I am trying to use WinHttpRequest to upload a file but it is not working. The PHP file is working from a cordova app i made. I dont know what else to do. Can anyone please help. Thanks. The VFP Code: filecontent = FileToStr(ficheiro) loHTTP =…
1
vote
0 answers

Twilio SMS API call not recognizing mediaurls

My goal is to send a text message in VBA with Twilio's API by using WinHttpRequest and a POST call. I put together a custom call using the WinHttpRequest for a basic SMS message and that worked. I can send text messages just fine. But then I tried…
Brent
  • 11
  • 1
1
vote
0 answers

.Write objHTTP.responseBody runtime error 3001

I have some problem with this vba code. This work from over the year. After last execution i get error in ".Write objHTTP.responseBody --runtime error 3001" I try figure out solution but I don't have any ideas. The code login in on page and download…
neez
  • 11
  • 2
1
vote
0 answers

Extracting .ASPXAUTH cookie from Visual Basic Script

I am creating an Excel Vbs script that is connecting to a ASP.Net application using Forms authentication. The connection works fine, the problem is that I am not able to extract the .ASPXAUTH cookie from it. Here is the script: Sub…
Adolfo Perez
  • 2,834
  • 4
  • 41
  • 61
1
vote
2 answers

Calling Rest API from VBA - "Connection with the server was terminated abnormally"

I am trying to RESTfull API from Excel VBA. I already have a working version in C#: //Request Auth Token var client = new RestClient("https://api.xxx.com/exp/oauth2/v1/access_token_cors"); var request = new…
anjulis
  • 219
  • 1
  • 4
  • 14
1
vote
1 answer

VBA WinHttpRequest 5.1 response text not full

Currently I am working on pulling data from webapplication using WinHttpRequest. I managed to succesfully perform various task, however I stumbled across weird problem. Some data is missing in .ResponseText. I've done the task manually and the…
KamilG
  • 71
  • 7
1
vote
1 answer

Download file from URL throws status code 406

Hi guys I have this sub I want to download a file from URL but everytime when I run it WinHttpReq.Status contains 406. Sub DownloadFile() Dim myURL As String myURL = "https://YourWebSite.com/?your_query_parameters" Dim WinHttpReq As…
hyunah
  • 21
  • 6
1
vote
2 answers

WinHttpRequest in VBA only works if preceded by a Browser call

The following URL returns an XML with USD exchange rate: http://www.boi.org.il/currency.xml?curr=01 I need to call and extract (by parsing the result) the returned rate from Excel VBA. When called in VBA after invoked manually in browser - it works…
Mor Sagmon
  • 905
  • 1
  • 16
  • 35
1
vote
1 answer

Best way to retreive WinHttpReq.ResponseBody skipped page data that is hot-linked, in VB6

I'm trying to maintain a piece of Visual Basic 6 software that was written to help expedite some text formatting for a department at my job. I'm not much of a computer engineer/scientist, but this piece of software falls into my jurisdiction as it…
Jones
  • 13
  • 2
1
vote
0 answers

Basic Upload Using VBA

I am trying to understand the file upload process using vba and winhttp. I am trying to upload files to: https://uploadfiles.io/ Using the following code in VBA: Public Function GetFileBytes(ByVal path As String) As Byte() Dim lngFileNum As…
Seraphim
  • 171
  • 1
  • 12
1
vote
1 answer

How to encrypt post parameters in Inno Setup

I have to post some user entered dynamic data to my server while installing. I can post the data successfully. But to post the data securely i have to encrypt the data while posting. I don't know how to do this.. Here is my code, procedure…
Arumuga Raja
  • 184
  • 13
1
vote
1 answer

WinHttpRequest in Inno Setup doesn't send credentials with Authenticate header

Based on some SO question I saw earlier, I'm using WinHttpRequest inside of Inno Setup to make a GET request to a web server (localhost:8000 right now). Minimal code below, the request is to the built-in Django debug server (python manage.py…
Nils Guillermin
  • 1,867
  • 3
  • 21
  • 51
1
vote
1 answer

VBA RESTful API GET Method issue

Hi I'm calling an API and using the winhttp request and the GET method. I'm passing a json style parameter in the send method but it just can't get accepted. I end up with the error message: {"code":"INS03","description":"Event ID…
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
0 answers

Obtaining site's HTML after GET that returns JSON

Introduction The main question is way down, but I guess it'd help to have some background in this case Ok, so I'd like to start by saying that this is actually my first question on stackoverflow - I have been using this site for ages, and I…
yassem
  • 41
  • 6