class PlayWhe::HTTP::Adapter

Attributes

http_client[R]

Public Class Methods

new(http_client) click to toggle source
# File lib/playwhe/http.rb, line 28
def initialize(http_client)
  @http_client = http_client
end

Public Instance Methods

post(url, data) click to toggle source
# File lib/playwhe/http.rb, line 32
def post(url, data)
  Response.new http_client.post(url, form: data)
rescue ::HTTP::Error
  raise PlayWhe::NetworkError
end