Page 1 of 1

Is there any http client on Switch 12?

Posted: Mon Sep 15, 2014 11:02 pm
by alanoliveira
Hi everyone!

Is there any way to make a http request in Switch 12 installed on a Windows 7 machine?



I have two scenarios I would like to use an http client to solve my problem.

In first one I would use a HTTP GET as a Producer.

In second I would like to make a POST with results.



The web application is out of my control, so I can't implement a SOAP webservice.



Thank you!

Is there any http client on Switch 12?

Posted: Mon Sep 15, 2014 11:11 pm
by dkelly
The only built-in HTTP functionality in Switch 12 is GET, Javascript function s.download(). You can use an external process such as cURL to implement other HTTP operations like PUT, POST, DELETE, etc.

Is there any http client on Switch 12?

Posted: Tue Sep 16, 2014 2:33 am
by gabrielp
dkelly wrote: You can use an external process such as cURL to implement other HTTP operations like PUT, POST, DELETE, etc.
That's what I do and it works really well. :D

Is there any http client on Switch 12?

Posted: Tue Sep 16, 2014 1:57 pm
by alanoliveira
Thank you guys!



I didn't know s.download() function, It solves a half of my problem, so i'll have to install curl to use as an external process.



Thanks again ;)

Is there any http client on Switch 12?

Posted: Wed Sep 17, 2014 6:04 pm
by pcobee
I use Microsofts XMLHTTP object in a Script for this all the time - mostly to retrieve graphics files from a remote service. You can implement GET, POST or SOAP with it. Works great.