📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 13:42:56
📂
/ (Root)
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Net
/
HTTP
📍 /opt/alt/ruby33/share/ri/system/Net/HTTP
🔄 Refresh
✏️
Editing: post-i.ri
Read Only
U:RDoc::AnyMethod[iI" post:ETI"Net::HTTP#post;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I")Sends a POST request to the server; ;TI"<returns an instance of a subclass of Net::HTTPResponse.;To:RDoc::Markup::BlankLine o; ; [I"8The request is based on the Net::HTTP::Post 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.post('/todos', data) do |res| ;TI" p res ;TI"<end # => #<Net::HTTPCreated 201 Created readbody=true> ;T:@format0o; ; [I"Output:;T@o;; [I"�"{\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\",\n \"id\": 201\n}" ;T; 0o; ; [I"=With no block given, simply returns the response object:;T@o;; [I"Rhttp.post('/todos', data) # => #<Net::HTTPCreated 201 Created readbody=true> ;T; 0o; ; [I" Related:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I":Net::HTTP::Post: request class for \HTTP method POST.;To;;0; [o; ; [I"?Net::HTTP.post: sends POST request, returns response body.;T: @fileI"lib/net/http.rb;T:0@omit_headings_from_table_of_contents_below0I"5post(path, data, initheader = nil) {|res| ... } ;TI"body_segment;T[ I"/(path, data, initheader = nil, dest = nil);T@9FI" HTTP;TcRDoc::NormalClass00
💾 Save Changes
❌ Cancel