?
Solved

Implement JSON via REST interface using a CURL script as a model?

Posted on 2015-01-24
5
Medium Priority
?
157 Views
Last Modified: 2015-01-25
I am trying to access a REST- based API using VBScript.  I have access to a Curl script that does just what I want to do, but don't have Curl on my Windows machine, and really don't know Curl anyway.  So looking for a "translation" from Curl to VBScript.  This is a known good Curl command line:

curl -X GET -H 'ACCEPT: application/json' -H 'X-AUTH-TOKEN: cee8d9a712fd59b18d1ee117' https://api.niftywebsite.com/statusUpdate
0
Comment
Question by:Mike Caldwell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 40568934
cURL is a free download.  http://curl.haxx.se/    I've been using the ones from this page:  http://www.paehl.com/open_source/?CURL_7.40.0
0
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 40569312
So, if I install Curl, can I make sort of a BAT file of it and call it from a VBScript?  The next step I want to get back is an XML or JSON stream that I can capture and make a screen display based upon the data received.  So the bottom line is, if I install Curl, how do I then run the Curl commands?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40569337
I suggested downloading cURL because duplicating it's functions would be difficult or at the very least, time consuming in VBScript.  You can run the cURL command in a batch file like any other program and receive the data back in a file.  Then you can use the file in your own program.
0
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 40569342
Thanks Dave.  I'm experimenting with that now.
0
 
LVL 1

Author Comment

by:Mike Caldwell
ID: 40569360
I have other VBScripts that run a BAT file fine, but not getting anywhere with this.  Thanks for pointing me to Curl, looks like it will work fine once I figure out how to run it with VBS and capture the returning data stream.  So I'll close out this question and make another pointedly re: how to get this done with a VBS.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome back!  My apologies for taking so long to write part two of this series; it's been a long time coming!  As I promised in Part 1, this article will focus on how to locate those elusive AD properties that you are searching for.  Why is this us…
I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question