Results for: "OptionParser"

Returns the password of the proxy server, if defined, nil otherwise; see Proxy Server.

No documentation available

Sends an HTTP request to the server; returns an instance of a subclass of Net::HTTPResponse.

The request is based on the Net::HTTPRequest object created from string path, string data, and initial headers hash header. That object is an instance of the subclass of Net::HTTPRequest, that corresponds to the given uppercase string name, which must be an HTTP request method or a WebDAV request method.

Examples:

http = Net::HTTP.new(hostname)
http.send_request('GET', '/todos/1')
# => #<Net::HTTPOK 200 OK readbody=true>
http.send_request('POST', '/todos', 'xyzzy')
# => #<Net::HTTPCreated 201 Created readbody=true>

Sets the read timeout, in seconds, for self to integer sec; the initial value is 60.

Argument sec must be a non-negative numeric value:

http = Net::HTTP.new(hostname)
http.read_timeout # => 60
http.get('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>
http.read_timeout = 0
http.get('/todos/1') # Raises Net::ReadTimeout.

Sets the write timeout, in seconds, for self to integer sec; the initial value is 60.

Argument sec must be a non-negative numeric value:

_uri = uri.dup
_uri.path = '/posts'
body = 'bar' * 200000
data = <<EOF
{"title": "foo", "body": "#{body}", "userId": "1"}
EOF
headers = {'content-type': 'application/json'}
http = Net::HTTP.new(hostname)
http.write_timeout # => 60
http.post(_uri.path, data, headers)
# => #<Net::HTTPCreated 201 Created readbody=true>
http.write_timeout = 0
http.post(_uri.path, data, headers) # Raises Net::WriteTimeout.

Returns true if self uses SSL, false otherwise. See Net::HTTP#use_ssl=.

Sets whether a new session is to use Transport Layer Security:

Raises IOError if attempting to change during a session.

Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.

No documentation available

Returns the password of the proxy server, if defined, nil otherwise; see Proxy Server.

No documentation available

Sends an HTTP request to the server; returns an instance of a subclass of Net::HTTPResponse.

The request is based on the Net::HTTPRequest object created from string path, string data, and initial headers hash header. That object is an instance of the subclass of Net::HTTPRequest, that corresponds to the given uppercase string name, which must be an HTTP request method or a WebDAV request method.

Examples:

http = Net::HTTP.new(hostname)
http.send_request('GET', '/todos/1')
# => #<Net::HTTPOK 200 OK readbody=true>
http.send_request('POST', '/todos', 'xyzzy')
# => #<Net::HTTPCreated 201 Created readbody=true>
No documentation available
No documentation available

true if the response has a body.

Private setter for the typecode v.

See also URI::FTP.typecode=.

Occasionally it’s helpful to treat a string as if it were interpolated so that there’s a consistent interface for working with strings.

Occasionally it’s helpful to treat a string as if it were interpolated so that there’s a consistent interface for working with strings.

Replace the value of offsets with the given value.

Return the byte offset of the start of the line corresponding to the given byte offset.

The byte offset from the beginning of the source where this location ends.

The line number where this location starts.

The column number in bytes where this location starts from the start of the line.

Implement the hash pattern matching interface for Location.

Implement the hash pattern matching interface for Comment.

Implement the hash pattern matching interface for MagicComment.

Search took: 4ms  ·  Total Results: 3731