Returns a string representation of self
:
Net::HTTP.new(hostname).inspect # => "#<Net::HTTP jsonplaceholder.typicode.com:80 open=false>"
Finishes the HTTP session:
http = Net::HTTP.new(hostname) http.start http.started? # => true http.finish # => nil http.started? # => false
Raises IOError
if not in a session.
Sends a PROPFIND request to the server; returns an instance of a subclass of Net::HTTPResponse
.
The request is based on the Net::HTTP::Propfind
object created from string path
, string body
, and initial headers hash initheader
.
data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' http = Net::HTTP.new(hostname) http.propfind('/todos/1', data)
Returns a string representation of the request:
Net::HTTP::Post.new(uri).inspect # => "#<Net::HTTP::Post POST>"
Returns the origin for an HTTP
uri, as defined in datatracker.ietf.org/doc/html/rfc6454.
Example:
URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com" URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000" URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com" URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com"
Produces the summary text. Each line of the summary is yielded to the block (without newline).
sdone
Already summarized short style options keyed hash.
ldone
Already summarized long style options keyed hash.
width
Width of left side (option part). In other words, the right side (description part) starts after width
columns.
max
Maximum width of left side -> the options are filled within max
columns.
indent
Prefix string indents all summarized lines.
Creates the summary table, passing each line to the block
(without newline). The arguments args
are passed along to the summarize method which is called on every option.
Completion
for hash key.
def inspect(inspector: NodeInspector) -> String
def inspect(inspector: NodeInspector) -> String
def inspect(inspector: NodeInspector) -> String
def inspect(inspector: NodeInspector) -> String
def inspect(inspector: NodeInspector) -> String
def opening: () -> String
?
def closing: () -> String
?
def inspect(inspector: NodeInspector) -> String
def opening: () -> String
?
def closing: () -> String
?