Private method to assemble query
from attributes
, scope
, filter
, and extensions
.
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.
Creates a self-signed certificate with an issuer and subject from email
, a subject alternative name of email
and the given extensions
for the key
.
Asks for a password with a prompt
@return [Object] the current possibility that the resolution is trying
to activate
(see Gem::Resolver::Molinillo::ResolutionState#conflicts)
Run UDP/IP server loop on the given sockets.
The return value of Socket.udp_server_sockets
is appropriate for the argument.
It calls the block for each message received.
Sets the basic list of characters that signal a break between words for the completer routine. The default is the characters which break words for completion in Bash: “ tn"\‘`@$><=;|&{(”.
Raises NotImplementedError
if the using readline library does not support.
Gets the basic list of characters that signal a break between words for the completer routine.
Raises NotImplementedError
if the using readline library does not support.
Sets the basic list of characters that signal a break between words for rl_complete_internal(). The default is the value of Readline.basic_word_break_characters
.
Raises NotImplementedError
if the using readline library does not support.
Gets the basic list of characters that signal a break between words for rl_complete_internal().
Raises NotImplementedError
if the using readline library does not support.
Encodes given str
to URL-encoded form data.
This method doesn’t convert *, -, ., 0-9, A-Z, _, a-z, but does convert SP (ASCII space) to + and converts others to %XX.
If enc
is given, convert str
to the encoding before percent encoding.
This is an implementation of www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data.
Decodes given str
of URL-encoded form data.
This decodes + to SP.
Add a list of paths to the $LOAD_PATH at the proper place.
Returns the string that is used to insert a space before the ‘:’ in JSON
objects.
Sets the string that is used to insert a space before the ‘:’ in JSON
objects.