D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Net
/
HTTP
/
Filename :
patch-i.ri
back
Copy
U:RDoc::AnyMethod[iI" patch:ETI"Net::HTTP#patch;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"*Sends a PATCH request to the server; ;TI"<returns an instance of a subclass of Net::HTTPResponse.;To:RDoc::Markup::BlankLine o; ; [I"9The request is based on the Net::HTTP::Patch object ;TI"Vcreated from string +path+, string +data+, and initial headers hash +initheader+.;T@o; ; [I"@With a block given, calls the block with the response body:;T@o:RDoc::Markup::Verbatim; [ I"Xdata = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' ;TI"$http = Net::HTTP.new(hostname) ;TI"+http.patch('/todos/1', data) do |res| ;TI" p res ;TI"2end # => #<Net::HTTPOK 200 OK readbody=true> ;T:@format0o; ; [I"Output:;T@o;; [I"�"{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false,\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\"\n}" ;T; 0o; ; [I"=With no block given, simply returns the response object:;T@o;; [I"Thttp.patch('/todos/1', data) # => #<Net::HTTPCreated 201 Created readbody=true>;T; 0: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0I"6patch(path, data, initheader = nil) {|res| ... } ;TI"body_segment;T[ I"/(path, data, initheader = nil, dest = nil);T@*FI" HTTP;TcRDoc::NormalClass00