るりまサーチ

最速Rubyリファレンスマニュアル検索!
264件ヒット [201-264件を表示] (0.030秒)
トップページ > クエリ:http[x] > クラス:URI::Generic[x]

別のキーワード

  1. net/http get
  2. http get
  3. http start
  4. net/http start
  5. net/http post

ライブラリ

キーワード

検索結果

<< < 1 2 3 >>

URI::Generic#hostname -> String | nil (7.0)

自身の hostname を文字列で返します。また、URI::Generic#host が設 定されていない場合は nil を返します。

...自身の hostname を文字列で返します。また、URI::Generic#host が設
定されていない場合は nil を返します。

このメソッドは URI::Generic#host に IPv6 アドレスが設定されていた
場合はブラケットを削除した文字列を返しますがそれ以...
...外は同じ文字列を返し
ます。

require 'uri'
u = URI("http://[::1]/bar")
p u.hostname # => "::1"
p u.host # => "[::1]"...

URI::Generic#opaque -> String | nil (7.0)

自身の opaque を文字列で返します。設定されていない場合は nil を返します。

...自身の opaque を文字列で返します。設定されていない場合は nil を返します。

例:
require 'uri'
p URI.parse('http://example.com/').opaque #=> nil
p URI.parse('mailto:nospam@localhost').opaque #=> "nospam@localhost"
p URI.parse('urn:ietf:rfc:1149').opaque...

URI::Generic#query -> String | nil (7.0)

自身の query を文字列で返します。設定されていない場合は nil を返します。

...自身の query を文字列で返します。設定されていない場合は nil を返します。

例:
require 'uri'
p URI.parse('http://example.com/?hoge').query #=> "hoge"...

URI::Generic#relative? -> bool (7.0)

自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。

...自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。

例:
require 'uri'
p URI.parse('http://example.com/').relative? #=> false
p URI.parse('./').relative? #=> true...

URI::Generic#select(*components) -> [String] (7.0)

指定された components に対応する構成要素を文字列の配列として返します。

...字列の配列として返します。

@param components 構成要素名をシンボルで指定します。

例:
require 'uri'

uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :path)
# => ["myuser:mypass", "my.example.com", "/test.rbx"]...

絞り込み条件を変える

URI::Generic.default_port -> Integer | nil (7.0)

スキームに対応するデフォルトのポート番号を整数で返します。

...するデフォルトのポート番号を整数で返します。

require 'uri'
URI::Generic
.default_port # => nil
URI::FTP.default_port # => 21
URI::HTTP.default_port # => 80
URI::HTTPS.default_port # => 443
URI::LDAP.default_port # => 389
URI::LDAPS....
<< < 1 2 3 >>