emailyak 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/emailyak/version.rb +1 -1
- data/lib/emailyak.rb +2 -2
- metadata +1 -1
data/lib/emailyak/version.rb
CHANGED
data/lib/emailyak.rb
CHANGED
@@ -135,7 +135,7 @@ module EmailYak
|
|
135
135
|
payload = nil
|
136
136
|
else
|
137
137
|
headers = {:content_type => 'application/json'}
|
138
|
-
payload = JSON.
|
138
|
+
payload = JSON.generate(params)
|
139
139
|
end
|
140
140
|
opts = {
|
141
141
|
:method => method,
|
@@ -172,7 +172,7 @@ module EmailYak
|
|
172
172
|
rbody = response.body
|
173
173
|
rcode = response.code
|
174
174
|
begin
|
175
|
-
resp = JSON
|
175
|
+
resp = JSON.parse(rbody)
|
176
176
|
rescue
|
177
177
|
raise APIError.new("Invalid response object from API: #{rbody.inspect} (HTTP response code was #{rcode})")
|
178
178
|
end
|