Ask for a password. Does not echo response to terminal.
Private method to assemble query
from attributes
, scope
, filter
, and extensions
.
Returns URL-escaped string following RFC 3986.
Returns URL-unescaped string following RFC 3986.
Writes a number of random generated bytes (currently 1024) to filename which can be used to initialize the PRNG by calling ::load_random_file
in a later session.
Calls the block with each capitalized field name:
res = Net::HTTP.get_response(hostname, '/todos/1') res.each_capitalized_name do |key| p key if key.start_with?('C') end
Output:
"Content-Type" "Connection" "Cache-Control" "Cf-Cache-Status" "Cf-Ray"
The capitalization is system-dependent; see Case Mapping.
Returns an enumerator if no block is given.
Sets the value of field 'Content-Type'
; returns the new value; see Content-Type request header:
req = Net::HTTP::Get.new(uri) req.set_content_type('application/json') # => ["application/json"]
Net::HTTPHeader#content_type=
is an alias for Net::HTTPHeader#set_content_type
.
Yields to a block and preserves the previous set of objects being printed.
A pretty print for a pair of Hash
Create a new BlockArgumentNode
node.
Create a new CallTargetNode
node.
Create a new CapturePatternNode
node.
Create a new ConstantReadNode
node.
Create a new EmbeddedVariableNode
node.
Create a new FindPatternNode
node.
Create a new ForwardingSuperNode
node.
Create a new HashPatternNode
node.