360件ヒット
[301-360件を表示]
(0.045秒)
別のキーワード
ライブラリ
-
net
/ http (264) - open-uri (60)
-
rexml
/ document (24) -
rexml
/ streamlistener (12)
クラス
-
Net
:: HTTP (12) -
Net
:: HTTPGenericRequest (24) -
REXML
:: Instruction (24)
モジュール
-
Net
:: HTTPHeader (228) -
OpenURI
:: Meta (60) -
REXML
:: StreamListener (12)
キーワード
- [] (12)
-
body
_ stream (12) -
body
_ stream= (12) - charset (24)
-
content
_ encoding (12) -
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type (24) -
content
_ type= (12) - delete (12)
- entitydecl (12)
- fetch (36)
-
form
_ data= (12) -
get
_ fields (12) - head (12)
- key? (12)
-
main
_ type (12) -
range
_ length (12) -
set
_ content _ type (12) -
set
_ form _ data (12) -
sub
_ type (12) - target (12)
-
type
_ params (12)
検索結果
先頭5件
-
Net
:: HTTPHeader # key?(key) -> bool (19.0) -
key というヘッダフィールドがあれば真を返します。 key は大文字小文字を区別しません。
...せん。
@param key 探すヘッダフィールド名を文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.key?('content-type') # => true
res.key?('nonexist-header') # => false
//}... -
Net
:: HTTPHeader # main _ type -> String|nil (19.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
...text/html" における "text" のようなタイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_re... -
Net
:: HTTPHeader # sub _ type -> String|nil (19.0) -
"text/html" における "html" のようなサブタイプを表す 文字列を返します。
...tml" における "html" のようなサブタイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_re... -
OpenURI
:: Meta # meta -> Hash (19.0) -
ヘッダを収録したハッシュを返します。
...ヘッダを収録したハッシュを返します。
//emlist[例][ruby]{
require 'open-uri'
open('http://example.com/') {|f|
p f.meta
#=> {"date"=>"Sun, 04 May 2008 11:26:40 GMT",
# "content-type"=>"text/html;charset=utf-8",
# "server"=>"Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.......ヘッダを収録したハッシュを返します。
//emlist[例][ruby]{
require 'open-uri'
URI.open('http://example.com/') {|f|
p f.meta
#=> {"date"=>"Sun, 04 May 2008 11:26:40 GMT",
# "content-type"=>"text/html;charset=utf-8",
# "server"=>"Apache/2.0.54 (Debian GNU/Linux) mod_ss... -
REXML
:: Instruction # target -> String (19.0) -
XML 処理命令のターゲットを返します。
...す。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css...