97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
# File 'lib/assemble/client.rb', line 97
def response(options={})
url = options[:url] || File.join(@url.to_s, options[:path] || "/")
method = (options[:method] || :get).to_s.to_sym
status = options[:status] || 200
body = options[:body]
= {
"Content-Type" => "application/json; charset=utf-8"
}.merge(options[:headers] || {})
Assemble::Response.new(
:status => status,
:headers => ,
:body => body,
:request => {
:method => method,
:url => url,
}
).raise!
end
|