]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/core/utils/httputil.rb
Stringlib/rbot/core/utils/extends.rbutfy_xml() method that tries to transcode a webpa...
[user/henk/code/ruby/rbot.git] / lib / rbot / core / utils / httputil.rb
index 78445abebcebdc39d99d5601612cc153a044ac1a..78ea9063e35ec6fbc22797ffea1ac5a3968bd607 100644 (file)
@@ -301,6 +301,22 @@ class HttpUtil
       resp.body
     end
 
+    class << resp.body
+      def http_headers
+        if defined?(@http_headers)
+          @http_headers
+        else
+          nil
+        end
+      end
+
+      def http_headers=(rsp)
+        @http_headers=rsp
+      end
+    end
+
+    resp.body.http_headers = resp.to_hash
+
     return resp
   end