[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2015-01-24
5
Medium Priority
?
161 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

Independent Software Vendors: 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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 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