summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-08-30 16:41:08 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-08-30 16:41:08 +0200
commit07b2f019851a105abf38f1b93540100788847b72 (patch)
treeedd1600a4efcb7e97a504e45e8a64226512f54aa
parent4ea25eba02d85b81dcee4302375d7d3e08cd52ac (diff)
httputil: POST respose '201 Created' is good
-rw-r--r--lib/rbot/core/utils/httputil.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb
index fa0addb9..76e3f298 100644
--- a/lib/rbot/core/utils/httputil.rb
+++ b/lib/rbot/core/utils/httputil.rb
@@ -640,7 +640,7 @@ class HttpUtil
opts = {:method => :post, :body => data, :cache => false}.merge(options)
begin
resp = get_response(uri, opts, &block)
- raise 'http error' unless Net::HTTPOK === resp
+ raise 'http error' unless Net::HTTPOK === resp or Net::HTTPCreated === resp
return resp
rescue Exception => e
error e