class FrCable::HTTPClient
Public Class Methods
post(url, params)
click to toggle source
# File lib/fr_cable/http_client.rb, line 3 def self.post url, params body = params[:body] header = { 'Content-Type' => 'application/json', 'Accept' => 'application/json' } uri = URI.parse(url) http = Net::HTTP.new(uri.host, uri.port) req = Net::HTTP::Post.new(uri.path, header) req.body = body http.request(req) end