chef/lib/chef/provider/http_request.rb
# Send a POST request to @new_resource.url, with the message as the payload
Send a POST request to @new_resource.url, with the message as the payload
Send a POST request to @new_resource . url with the message as the payload
def action_post
        converge_by("#{@new_resource} POST to #{@new_resource.url}") do
          message = check_message(@new_resource.message)
          body = @rest.run_request(
            :POST,
            @rest.create_url("#{@new_resource.url}"),
            @new_resource.headers,
            message,
            10,
            false
          )
          Chef::Log.info("#{@new_resource} POST to #{@new_resource.url} message: #{message.inspect} successful")
          Chef::Log.debug("#{@new_resource} POST request response: #{body}")
        end
      end
def action_post converge_by ( "#{@new_resource} POST to #{@new_resource.url}" ) do message = check_message ( @new_resource . message ) body = @rest . run_request ( :POST , @rest . create_url ( "#{@new_resource.url}" ) , @new_resource . headers , message , 10 , false ) Chef :: Log . info ( "#{@new_resource} POST to #{@new_resource.url} message: #{message.inspect} successful" ) Chef :: Log . debug ( "#{@new_resource} POST request response: #{body}" ) end end
Send a POST request to @new_resource.url, with the message as the payload
Send a POST request to @new_resource . url with the message as the payload