Results for: "Data"

Starts an HTTP session.

Without a block, returns self:

http = Net::HTTP.new(hostname)
# => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
http.start
# => #<Net::HTTP jsonplaceholder.typicode.com:80 open=true>
http.started? # => true
http.finish

With a block, calls the block with self, finishes the session when the block exits, and returns the block’s value:

http.start do |http|
  http
end
# => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false>
http.started? # => false

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

The request is based on the Net::HTTP::Patch object created from string path, string data, and initial headers hash initheader.

With a block given, calls the block with the response body:

data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}'
http = Net::HTTP.new(hostname)
http.patch('/todos/1', data) do |res|
  p res
end # => #<Net::HTTPOK 200 OK readbody=true>

Output:

"{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"delectus aut autem\",\n  \"completed\": false,\n  \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\"\n}"

With no block given, simply returns the response object:

http.patch('/todos/1', data) # => #<Net::HTTPCreated 201 Created readbody=true>

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

The request is based on the Net::HTTP::Proppatch 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.proppatch('/todos/1', data)

Returns the path from an FTP URI.

RFC 1738 specifically states that the path for an FTP URI does not include the / which separates the URI path from the URI host. Example:

ftp://ftp.example.com/pub/ruby

The above URI indicates that the client should connect to ftp.example.com then cd to pub/ruby from the initial login directory.

If you want to cd to an absolute directory, you must include an escaped / (%2F) in the path. Example:

ftp://ftp.example.com/%2Fpub/ruby

This method will then return “/pub/ruby”.

Completion for hash key.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Mirrors the C extension’s StringQuery::constant? method.

Whether or not this string is a valid constant name.

Mirrors the Method#parameters method.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

A Location object representing the location of this token in the source.

Gets the IP address of name from the hosts file.

Gets all IP addresses for name from the hosts file.

Gets the IP address of name from the DNS resolver.

name can be a Resolv::DNS::Name or a String. Retrieved address will be a Resolv::IPv4 or Resolv::IPv6

Gets all IP addresses for name from the DNS resolver.

name can be a Resolv::DNS::Name or a String. Retrieved addresses will be a Resolv::IPv4 or Resolv::IPv6

No documentation available

Creates a new IPv6 address from arg which may be:

IPv6

returns arg.

String

arg must match one of the IPv6::Regex* constants

True when the gem has been activated

Platform of the gem

Search took: 3ms  ·  Total Results: 1499