Method: Capybara::HTTPClientJson::Driver#patch
- Defined in:
- lib/capybara/httpclient_json/driver.rb
#patch(url, json, headers = {}) ⇒ Object
61 62 63 64 65 |
# File 'lib/capybara/httpclient_json/driver.rb', line 61 def patch(url, json, headers = {}) json = MultiJson.dump(json) unless json.is_a?(String) headers['Content-Type'] = "application/json; charset=#{json.encoding.to_s.downcase}" process :patch, url, json, headers, [:follow_redirect] end |