On 13.11.2013 17:04, ulrich igor ngouagna kouete wrote:
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?

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

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/5284873F.6050409%40dasz.at.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to