Module: Dawn::BaseApi::RequestExtension

Includes:
SafeExtension
Included in:
Dawn::BaseApi, ClassExtension
Defined in:
lib/dawn/api/base_api.rb,
lib/dawn/api/safe/base_api.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from SafeExtension

#safe

Instance Method Details

#request(options) ⇒ Object

Wrapper function around Dawn.request

Parameters:

  • options (Hash)


15
16
17
18
# File 'lib/dawn/api/base_api.rb', line 15

def request(options)
  options[:expects] = 200 unless options.key?(:expects)
  JSON.load Dawn.request(options).body
end