REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.80 KB
Close
//proc/thread-self/root/opt/alt/ruby33/share/ruby/net/http/request.rb
Text
Base64
# frozen_string_literal: true # This class is the base class for \Net::HTTP request classes. # The class should not be used directly; # instead you should use its subclasses, listed below. # # == Creating a Request # # An request object may be created with either a URI or a string hostname: # # require 'net/http' # uri = URI('https://jsonplaceholder.typicode.com/') # req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET> # req = Net::HTTP::Get.new(uri.hostname) # => #<Net::HTTP::Get GET> # # And with any of the subclasses: # # req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD> # req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST> # req = Net::HTTP::Put.new(uri) # => #<Net::HTTP::Put PUT> # # ... # # The new instance is suitable for use as the argument to Net::HTTP#request. # # == Request Headers # # A new request object has these header fields by default: # # req.to_hash # # => # {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"], # "accept"=>["*/*"], # "user-agent"=>["Ruby"], # "host"=>["jsonplaceholder.typicode.com"]} # # See: # # - {Request header Accept-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Accept-Encoding] # and {Compression and Decompression}[rdoc-ref:Net::HTTP@Compression+and+Decompression]. # - {Request header Accept}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#accept-request-header]. # - {Request header User-Agent}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#user-agent-request-header]. # - {Request header Host}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#host-request-header]. # # You can add headers or override default headers: # # # res = Net::HTTP::Get.new(uri, {'foo' => '0', 'bar' => '1'}) # # This class (and therefore its subclasses) also includes (indirectly) # module Net::HTTPHeader, which gives access to its # {methods for setting headers}[rdoc-ref:Net::HTTPHeader@Setters]. # # == Request Subclasses # # Subclasses for HTTP requests: # # - Net::HTTP::Get # - Net::HTTP::Head # - Net::HTTP::Post # - Net::HTTP::Put # - Net::HTTP::Delete # - Net::HTTP::Options # - Net::HTTP::Trace # - Net::HTTP::Patch # # Subclasses for WebDAV requests: # # - Net::HTTP::Propfind # - Net::HTTP::Proppatch # - Net::HTTP::Mkcol # - Net::HTTP::Copy # - Net::HTTP::Move # - Net::HTTP::Lock # - Net::HTTP::Unlock # class Net::HTTPRequest < Net::HTTPGenericRequest # Creates an HTTP request object for +path+. # # +initheader+ are the default headers to use. Net::HTTP adds # Accept-Encoding to enable compression of the response body unless # Accept-Encoding or Range are supplied in +initheader+. def initialize(path, initheader = nil) super self.class::METHOD, self.class::REQUEST_HAS_BODY, self.class::RESPONSE_HAS_BODY, path, initheader end end
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
backward.rb
1.05 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
exceptions.rb
837 B
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
generic_request.rb
12.11 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
header.rb
32.00 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
proxy_delta.rb
271 B
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
request.rb
2.80 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
requests.rb
12.84 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
response.rb
19.12 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
responses.rb
39.50 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
status.rb
2.25 KB
lrw-r--r--
2026-04-07 13:52:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).