fixed a typo added when I added more debugging info to the request processing
This commit is contained in:
parent
b1999ac8b7
commit
d383c5a7d4
|
@ -125,10 +125,11 @@ module CouchRest
|
|||
end
|
||||
|
||||
def put(uri, doc = nil)
|
||||
payload = doc.to_json if doc
|
||||
begin
|
||||
JSON.parse(RestClient.post(uri, payload))
|
||||
JSON.parse(RestClient.put(uri, payload))
|
||||
rescue Exception => e
|
||||
raise "Error while sending a POST request #{uri}\npayload: #{payload.inspect}\n#{e}"
|
||||
raise "Error while sending a PUT request #{uri}\npayload: #{payload.inspect}\n#{e}"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -142,7 +143,11 @@ module CouchRest
|
|||
|
||||
def post uri, doc = nil
|
||||
payload = doc.to_json if doc
|
||||
begin
|
||||
JSON.parse(RestClient.post(uri, payload))
|
||||
rescue Exception => e
|
||||
raise "Error while sending a POST request #{uri}\npayload: #{payload.inspect}\n#{e}"
|
||||
end
|
||||
end
|
||||
|
||||
def delete uri
|
||||
|
|
Loading…
Reference in a new issue