144件ヒット
[101-144件を表示]
(0.015秒)
種類
- インスタンスメソッド (72)
- モジュール関数 (24)
- ライブラリ (24)
- 文書 (12)
- 特異メソッド (12)
ライブラリ
-
cgi
/ core (24) -
net
/ http (24) - uri (12)
-
webrick
/ httprequest (12) -
webrick
/ httputils (12) -
win32
/ registry (24)
クラス
-
Net
:: HTTP (24) -
URI
:: FTP (12) -
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPUtils :: FormData (12)
モジュール
-
CGI
:: QueryExtension (24) -
Win32
:: Registry :: API (24)
キーワード
- QueryInfoKey (12)
- QueryValue (12)
- [] (12)
-
auth
_ type (12) - cgi (12)
-
content
_ type (12) - new (12)
- post (24)
-
ruby 1
. 8 . 4 feature (12) -
webrick
/ cgi (12)
検索結果
先頭4件
-
cgi (60.0)
-
CGI プログラムの支援ライブラリです。
...うのが最も簡単です。
//emlist[][ruby]{
# 保存
require 'pstore'
db = PStore.new("query.db")
db.transaction do
db["params"] = cgi.params
end
# 復帰
require 'pstore'
db = PStore.new("query.db")
db.transaction do
cgi.params = db["params"]
end
//}
ただし、PStore は Ruby のバ......l_path # ローカルファイルのパス
value.original_filename # 元の名前
value.content_type # content_type
//}
==== クライアントにクッキーを渡す
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
for name, cookie in cgi.cook......されます。
例えば AUTH_TYPE には CGI#auth_type が対応します。
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
value = cgi.auth_type
//}
このような環境変数には以下のものがあります。
* AUTH_TYPE
* CONTENT_LENGTH
* CONTENT_TYPE
* GATEWAY_INTERFACE
* PAT... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (30.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...ェクトは有効な body を
持ちません。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数......esponse, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby') do |str|
f.write str... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (30.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...ェクトは有効な body を
持ちません。
POST する場合にはヘッダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数......esponse, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# using block
File.open('save.html', 'w') {|f|
http.post('/cgi-bin/search.rb', 'query=subject&target=ruby') do |str|
f.write str... -
WEBrick
:: HTTPUtils :: FormData # [](header) -> String | nil (12.0) -
自身が multipart/form-data なデータの場合に、header で指定された ヘッダの値を文字列で返します。無ければ nil を返します。
...nil を返します。
@param header ヘッダ名を文字列で指定します。大文字と小文字を区別しません。
例:
require "webrick/cgi"
class MyCGI < WEBrick::CGI
def do_GET(req, res)
p req.query['q']['content-type'] #=> "plain/text"
end
end
MyCGI.new.start()...