lib/ronin/network/http/http.rb in ronin-support-0.4.0.rc2 vs lib/ronin/network/http/http.rb in ronin-support-0.4.0

- old
+ new

@@ -969,9 +969,44 @@ def http_post_body(options={}) http_post(options).body end # + # Performs an HTTP PUT request. + # + # @param [Hash] options + # Additional options. + # + # @option options [String] :body + # The body for the request. + # + # @option options [Hash, String] :form_data + # The form data to send with the HTTP PUT request. + # + # @yield [response] + # If a block is given, it will be passed the response received from + # the request. + # + # @yieldparam [Net::HTTP::Response] response + # The HTTP response object. + # + # @return [Net::HTTP::Response] + # The response of the HTTP request. + # + # @see http_request + # + # @since 0.4.0 + # + # @api public + # + def http_put(options={}) + response = http_request(options.merge(:method => :put)) + + yield response if block_given? + return response + end + + # # Performs an HTTP Propfind request. # # @param [Hash] options # Additional options. #