From: Giuseppe Bilotta Date: Sun, 30 Aug 2009 14:41:08 +0000 (+0200) Subject: httputil: POST respose '201 Created' is good X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=07b2f019851a105abf38f1b93540100788847b72;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git httputil: POST respose '201 Created' is good --- 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