class Net::HTTP::Patch
Klasse zur Darstellung der HTTP-Methode PATCH
require 'net/http' uri = URI('http://example.com') hostname = uri.hostname # => "example.com" uri.path = '/posts' req = Net::HTTP::Patch.new(uri) # => #<Net::HTTP::Patch PATCH> req.body = '{"title": "foo","body": "bar","userId": 1}' req.content_type = 'application/json' res = Net::HTTP.start(hostname) do |http| http.request(req) end
Siehe Request Headers.
Eigenschaften
-
Anfragekörper: ja.
-
Antwortkörper: ja.
-
Sicher: nein.
-
Idempotent: nein.
-
Cachebar: nein.
Verwandt
-
Net::HTTP#patch: sendet einePATCH-Anfrage, gibt das Antwortobjekt zurück.