Results for: "String# "

This method will return the index of a field with the provided header. The offset can be used to locate duplicate header names, as described in CSV::Row.field().

A summary of fields, by header, in an ASCII compatible String.

Shows the mode and size of this table in a US-ASCII String.

Winds back to the beginning

Get the URI of the remote object.

Get the URI of the remote object.

No documentation available
No documentation available
No documentation available
No documentation available

A setter to toggle transfers in binary mode. newmode is either true or false

Logs in to the remote host. The session must have been previously connected. If user is the string “anonymous” and the password is nil, “anonymous@” is used as a password. If the acct parameter is not nil, an FTP ACCT command is sent following the successful login. Raises an exception on error (typically Net::FTPPermError).

Retrieves remotefile in binary mode, storing the result in localfile. If localfile is nil, returns retrieved data. If a block is supplied, it is passed the retrieved data in blocksize chunks.

Transfers localfile to the server in binary mode, storing the result in remotefile. If a block is supplied, calls it, passing in the transmitted data in blocksize chunks.

Returns an array of filenames in the remote directory.

Returns an array of file information in the directory (the output is like ‘ls -l`). If a block is given, it iterates through the listing.

Returns data (e.g., size, last modification time, entry type, etc.) about the file or directory specified by pathname. If pathname is omitted, the current directory is assumed.

Returns system information.

Returns the status (STAT command).

pathname

when stat is invoked with pathname as a parameter it acts like list but a lot faster and over the same tcp session.

Posts data to the specified URI object.

Example:

require 'net/http'
require 'uri'

Net::HTTP.post URI('http://www.example.com/api/search'),
               { "q" => "ruby", "max" => "50" }.to_json,
               "Content-Type" => "application/json"

Creates a new Net::HTTP object, then additionally opens the TCP connection and HTTP session.

Arguments are the following:

address

hostname or IP address of the server

port

port of the server

p_addr

address of proxy

p_port

port of proxy

p_user

user of proxy

p_pass

pass of proxy

opt

optional hash

opt sets following values by its accessor. The keys are ipaddr, ca_file, ca_path, cert, cert_store, ciphers, close_on_empty_response, key, open_timeout, read_timeout, write_timeout, ssl_timeout, ssl_version, use_ssl, verify_callback, verify_depth and verify_mode. If you set :use_ssl as true, you can use https and default value of verify_mode is set as OpenSSL::SSL::VERIFY_PEER.

If the optional block is given, the newly created Net::HTTP object is passed to it and closed when the block finishes. In this case, the return value of this method is the return value of the block. If no block is given, the return value of this method is the newly created Net::HTTP object itself, and the caller is responsible for closing it upon completion using the finish() method.

No documentation available

Returns true if the HTTP session has been started.

Opens a TCP connection and HTTP session.

When this method is called with a block, it passes the Net::HTTP object to the block, and closes the TCP connection and HTTP session after the block has been executed.

When called with a block, it returns the return value of the block; otherwise, it returns self.

Finishes the HTTP session and closes the TCP connection. Raises IOError if the session has not been started.

Search took: 5ms  ·  Total Results: 3115