Module: Xeroizer::Http

Included in:
GenericApplication
Defined in:
lib/xeroizer/http.rb

Constant Summary collapse

ACCEPT_MIME_MAP =
{
  :pdf  => 'application/pdf',
  :json => 'application/json'
}

Instance Method Summary collapse

Instance Method Details

#http_get(client, url, extra_params = {}) ⇒ Object

Shortcut method for #http_request with ‘method` = :get.



28
29
30
# File 'lib/xeroizer/http.rb', line 28

def http_get(client, url, extra_params = {})
  http_request(client, :get, url, nil, extra_params)
end

#http_post(client, url, body, extra_params = {}) ⇒ Object

Shortcut method for #http_request with ‘method` = :post.



38
39
40
# File 'lib/xeroizer/http.rb', line 38

def http_post(client, url, body, extra_params = {})
  http_request(client, :post, url, body, extra_params)
end

#http_put(client, url, body, extra_params = {}) ⇒ Object

Shortcut method for #http_request with ‘method` = :put.



48
49
50
# File 'lib/xeroizer/http.rb', line 48

def http_put(client, url, body, extra_params = {})
  http_request(client, :put, url, body, extra_params)
end