lib/grenache/http.rb in grenache-ruby-http-0.2.16 vs lib/grenache/http.rb in grenache-ruby-http-0.2.17
- old
+ new
@@ -69,9 +69,23 @@
end
rescue Exception => e
return [e, nil]
end
+ def put(payload, params={})
+ resp = link.send('put', payload, params)
+ return [nil, resp]
+ rescue Exception => e
+ return [e, nil]
+ end
+
+ def get(t_hash, params={})
+ resp = link.send('get', t_hash, params)
+ return [nil, Oj.dump(resp)]
+ rescue Exception => e
+ return [e, nil]
+ end
+
private
def tls?
!! config.cert_pem
end