480件ヒット
[201-300件を表示]
(0.141秒)
ライブラリ
- ビルトイン (12)
-
cgi
/ core (48) -
net
/ http (108) -
net
/ imap (132) - open-uri (60)
-
rdoc
/ markup (12) -
rexml
/ document (24) -
webrick
/ httprequest (24) -
webrick
/ httpresponse (48) -
webrick
/ httputils (12)
クラス
- CGI (36)
- IO (12)
-
Net
:: IMAP :: BodyTypeBasic (36) -
Net
:: IMAP :: BodyTypeMessage (36) -
Net
:: IMAP :: BodyTypeText (36) -
Net
:: IMAP :: ContentDisposition (24) -
RDoc
:: Markup (12) -
REXML
:: Instruction (24) -
WEBrick
:: HTTPRequest (24) -
WEBrick
:: HTTPResponse (48) -
WEBrick
:: HTTPUtils :: FormData (12)
モジュール
-
CGI
:: QueryExtension (12) -
Net
:: HTTPHeader (108) -
OpenURI
:: Meta (48) -
OpenURI
:: OpenRead (12)
キーワード
- [] (24)
- charset (24)
-
content
_ encoding (12) -
content
_ id (36) -
content
_ length (12) -
content
_ length= (12) -
content
_ type (60) - delete (12)
- description (36)
-
dsp
_ type (12) - encoding (36)
- fetch (36)
-
get
_ fields (12) - header (12)
-
main
_ type (12) - out (12)
- param (12)
- print (12)
- query (12)
- read (12)
- readpartial (12)
-
sub
_ type (12) - target (12)
-
to
_ s (12)
検索結果
先頭5件
-
Net
:: HTTPHeader # fetch(key) -> String (134.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......n
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found: "content-length">
end
//}
//emlist[例 key , default を指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "defa......ult") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (134.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......n
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found: "content-length">
end
//}
//emlist[例 key , default を指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "defa......ult") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
Net
:: HTTPHeader # fetch(key , default) -> String (134.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......n
req.fetch("content-length")
rescue => e
e # => #<KeyError: key not found: "content-length">
end
//}
//emlist[例 key , default を指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length", "defa......ult") # => "default"
//}
//emlist[例 key とブロックを指定][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("content-length") { |e| 99 } # => 99
//}
@see Net::HTTPHeader#[]... -
OpenURI
:: Meta # charset -> String | nil (131.0) -
対象となるリソースの文字コードを文字列で返します。Content-Type ヘッダの文字コード情報が使われます。 文字列は小文字へと変換されています。
...対象となるリソースの文字コードを文字列で返します。Content-Type ヘッダの文字コード情報が使われます。
文字列は小文字へと変換されています。
Content-Type ヘッダがない場合は、nil を返します。ただし、ブロックが与え......身のタイプが text である場合は、
2616 3.7.1 で定められているとおり、文字列 "iso-8859-1" を返します。
//emlist[例][ruby]{
require 'open-uri'
open("http://www.ruby-lang.org/en") {|f|
p f.content_type # => "text/html"
p f.charset # => "iso-8859-1"
}
//}......のタイプが text である場合は、
2616 3.7.1 で定められているとおり、文字列 "iso-8859-1" を返します。
//emlist[例][ruby]{
require 'open-uri'
URI.open("http://www.ruby-lang.org/en") {|f|
p f.content_type # => "text/html"
p f.charset # => "iso-8859-1"
}
//}... -
OpenURI
:: Meta # charset { . . . } -> String (131.0) -
対象となるリソースの文字コードを文字列で返します。Content-Type ヘッダの文字コード情報が使われます。 文字列は小文字へと変換されています。
...対象となるリソースの文字コードを文字列で返します。Content-Type ヘッダの文字コード情報が使われます。
文字列は小文字へと変換されています。
Content-Type ヘッダがない場合は、nil を返します。ただし、ブロックが与え......身のタイプが text である場合は、
2616 3.7.1 で定められているとおり、文字列 "iso-8859-1" を返します。
//emlist[例][ruby]{
require 'open-uri'
open("http://www.ruby-lang.org/en") {|f|
p f.content_type # => "text/html"
p f.charset # => "iso-8859-1"
}
//}......のタイプが text である場合は、
2616 3.7.1 で定められているとおり、文字列 "iso-8859-1" を返します。
//emlist[例][ruby]{
require 'open-uri'
URI.open("http://www.ruby-lang.org/en") {|f|
p f.content_type # => "text/html"
p f.charset # => "iso-8859-1"
}
//}... -
Net
:: HTTPHeader # delete(key) -> [String] | nil (126.0) -
key ヘッダフィールドを削除します。
...は
nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length = 10
req.content_length # => 10
req.delete("Content-Length") # => ["10"]
req.content_length # => nil
//}... -
IO
# readpartial(maxlen , outbuf = "") -> String (120.0) -
IO から長さ maxlen を上限として読み込み、文字列として返します。 即座に得られるデータが存在しないときにはブロックしてデータの到着を待ちます。 即座に得られるデータが 1byte でも存在すればブロックしません。
...ます。
例えば、パイプに対しては次のように動作します。
r, w = IO.pipe # buffer pipe content
w << "abc" # "" "abc".
r.readpartial(4096) #=> "abc" "" ""
r.readpartial(40......# バッファにもパイプにもデータがないのでブロックする
r, w = IO.pipe # buffer pipe content
w << "abc" # "" "abc"
w.close # "" "abc" EOF
r.readpar......" "" EOF
r.readpartial(4096) # 例外 EOFError 発生
r, w = IO.pipe # buffer pipe content
w << "abc\ndef\n" # "" "abc\ndef\n"
r.gets #=> "abc\n" "def\n" ""
w << "ghi... -
Net
:: IMAP :: BodyTypeBasic # description -> String | nil (118.0) -
Content-Description の値を文字列で返します。
...Content-Description の値を文字列で返します。
@see 2045... -
Net
:: IMAP :: BodyTypeBasic # encoding -> String (118.0) -
Content-Transfer-Encoding の値を文字列で返します。
...Content-Transfer-Encoding の値を文字列で返します。
@see 2045...