ライブラリ
クラス
- CGI (24)
-
Net
:: HTTP (168) -
Net
:: HTTPGenericRequest (12) -
Net
:: HTTPResponse (108) -
RDoc
:: Options (24) - String (36)
-
WEBrick
:: HTTPResponse (12)
モジュール
-
CGI
:: HtmlExtension (564) -
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (72) -
OpenURI
:: Meta (12)
キーワード
- a (24)
- base (12)
- blockquote (24)
- body (12)
- caption (24)
- checkbox (24)
-
checkbox
_ group (24) - code (12)
-
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type (24) -
content
_ type= (24) - encode (36)
- entity (12)
-
file
_ field (24) - form (48)
- generator (12)
- get (24)
- get2 (24)
- head (12)
- head2 (24)
- header (12)
- hidden (24)
-
http
_ version (12) - img (24)
- msg (12)
-
multipart
_ form (48) - out (12)
-
password
_ field (24) - post (24)
-
radio
_ group (24) -
read
_ body (24) -
request
_ get (24) -
request
_ head (24) - reset (24)
- response (12)
-
response
_ body _ permitted? (12) -
scrolling
_ list (24) -
send
_ request (12) -
set
_ content _ type (12) - submit (24)
- template (12)
-
text
_ field (24) - textarea (24)
- value (12)
検索結果
先頭5件
-
Net
:: HTTPHeader # content _ length=(len) (6107.0) -
Content-Length: ヘッダフィールドに値を設定します。
...Content-Length: ヘッダフィールドに値を設定します。
len に nil を与えると Content-Length: ヘッダフィールドを
削除します。
@param len 設定する値を整数で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/ind......ex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10 # => 10
req.content_length # => 10
//}... -
Net
:: HTTPHeader # content _ range -> Range|nil (6107.0) -
Content-Range: ヘッダフィールドの値を Range で返します。 Range の表わす長さは Net::HTTPHeader#range_length で得られます。
...Content-Range: ヘッダフィールドの値を Range で返します。
Range の表わす長さは Net::HTTPHeader#range_length で得られます。
ヘッダが設定されていない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.exa......mple.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_range # => nil
req['Content-Range'] = "bytes 0-499/1234"
req.content_range # => 0..499
//}... -
Net
:: HTTPHeader # content _ type=(type) (6107.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html'......)
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (6107.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html'......)
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
OpenURI
:: Meta # content _ type -> String (6107.0) -
対象となるリソースの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。 Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
...Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。
Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
//emlist[例][ruby]{
require 'open-uri'
open('http://www.ruby-lang.org/') {|f|
p f.content_type #=> "text/html"......ースの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。
Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
//emlist[例][ruby]{
require 'open-uri'
URI.open('http://www.ruby-lang.org/') {|f|
p f.content_type #... -
CGI
:: HtmlExtension # multipart _ form(action = nil , enctype = "multipart / form-data") -> String (6101.0) -
enctype 属性に "multipart/form-data" をセットした form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...トした form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param action action 属性の値を指定します。
@param enctype enctype 属性の値を指定します。
例:
multipart_form{ "string" }
# <FORM METHO... -
CGI
:: HtmlExtension # multipart _ form(action = nil , enctype = "multipart / form-data") { . . . } -> String (6101.0) -
enctype 属性に "multipart/form-data" をセットした form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...トした form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param action action 属性の値を指定します。
@param enctype enctype 属性の値を指定します。
例:
multipart_form{ "string" }
# <FORM METHO... -
CGI
:: HtmlExtension # blockquote(cite = nil) -> String (6013.0) -
blockquote 要素を生成します。
...が内容になります。
@param cite 引用元を指定します。属性をハッシュで指定することもできます。
例:
blockquote("http://www.example.com/quotes/foo.html") { "Foo!" }
#=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!</BLOCKQUOTE>... -
CGI
:: HtmlExtension # blockquote(cite = nil) { . . . } -> String (6013.0) -
blockquote 要素を生成します。
...が内容になります。
@param cite 引用元を指定します。属性をハッシュで指定することもできます。
例:
blockquote("http://www.example.com/quotes/foo.html") { "Foo!" }
#=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!</BLOCKQUOTE>...