issuing web request (REST) from a manifest file

24 views
Skip to first unread message

ulrich igor ngouagna kouete

unread,
Nov 13, 2013, 11:04:07 AM11/13/13
to puppe...@googlegroups.com
Hi,

I'm looking for a resource / type that will allow me to issue web requests from a manifest file. I've heard about the web_request module , but seems quite dificult to use (in fact I do not succeed in issuing a POST request with a JSON body doc).

Any ideas about that?

Thanks.

David Schmitt

unread,
Nov 14, 2013, 3:18:07 AM11/14/13
to puppe...@googlegroups.com
I needed to get a version number from a REST service just yesterday. My
solution looks like this:

> $current_version = inline_template("<% require 'open-uri' %><%= open('${version_url}') { |f| f.each_line.to_a.join.strip } %>")

That's obviously only a GET request, but it works remarkably well and
(contrary to Net::HTTP) supports and validates SSL certificates out of
the box.


Regards, David

Reply all
Reply to author
Forward
0 new messages