# Generated by Puppet
LoadPlugin "curl_json"

<Plugin "curl_json">
  <URL "<%= @url %>">
    Instance "<%= @instance %>"

<% if @user %>
    User "<%= @user %>"
    Password "<%= @password %>"
<% end %>

<% @keys.each do |key,keydata| %>
    <Key "<%= key %>">
      Type "<%= keydata['type'] %>"
    </Key>
<% end -%>

  </URL>
</Plugin>

# Generated by Puppet
LoadPlugin "curl_json"

<Plugin "curl_json">
<%- if @url.start_with? '/' -%>
  <Sock "<%= @url %>">
<%- else -%>
  <URL "<%= @url %>">
<%- end -%>
    Instance "<%= @instance %>"

<% if @user %>
    User "<%= @user %>"
    Password "<%= @password %>"
<% end %>

<% @keys.each do |key,keydata| %>
    <Key "<%= key %>">
      Type "<%= keydata['type'] %>"
    </Key>
<% end -%>

<%- if @url.start_with? '/' -%>
  </Sock>
<%- else -%>
  </URL>
<%- end -%>
</Plugin>

Support reading from a unix socket
curl_json: Support reading from a unix socket
