class Gem::Net::HTTP::Patch
- Gem::Net::HTTP#patch: sends PATCH
request, returns response object.
Related:
- Cacheable: no.
- Idempotent: no.
- Safe: no.
- Response body: yes.
- Request body: yes.
Properties:
See Request Headers.
end
http.request(req)
res = Gem::Net::HTTP.start(hostname) do |http|
req.content_type = ‘application/json’
req.body = ‘{“title”: “foo”,“body”: “bar”,“userId”: 1}’
req = Gem::Net::HTTP::Patch.new(uri) # => #<Gem::Net::HTTP::Patch PATCH>
uri.path = ‘/posts’
hostname = uri.hostname # => “example.com”
uri = Gem::URI(‘example.com’)
require ‘rubygems/vendor/net-http/lib/net/http’
:
Class for representing