Class: Net::HTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/active_notifier/core_ext/net/http/post.rb

Overview

Add ::post for version less than 2.4 and change ::post for version 2.4

Class Method Summary collapse

Class Method Details

.post(url, data, header = nil) ⇒ Object


5
6
7
8
9
# File 'lib/active_notifier/core_ext/net/http/post.rb', line 5

def self.post(url, data, header = nil)
  start(url.hostname, url.port, use_ssl: url.scheme == "https") do |http|
    http.post(url, data, header)
  end
end