]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
httputil: POST respose '201 Created' is good
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Aug 2009 14:41:08 +0000 (16:41 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Aug 2009 14:41:08 +0000 (16:41 +0200)
lib/rbot/core/utils/httputil.rb

index fa0addb98a2ec6b067df091cdafb3d10ec5eb6fc..76e3f2987ccfd817002900dc5086f9d86f5172c8 100644 (file)
@@ -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