ライブラリ
- ビルトイン (165)
- benchmark (12)
-
cgi
/ html (96) - date (12)
- e2mmap (12)
-
irb
/ context (12) - logger (84)
- mkmf (12)
-
net
/ http (84) - openssl (36)
-
rexml
/ document (60) - rss (60)
-
rubygems
/ format (24) -
rubygems
/ installer (12) -
rubygems
/ old _ format (72) -
rubygems
/ platform (132) -
rubygems
/ source _ index (12) -
rubygems
/ source _ info _ cache (24) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ specification (48) -
rubygems
/ version _ option (12) - scanf (42)
- stringio (12)
-
syslog
/ logger (36) -
webrick
/ httputils (132) -
webrick
/ log (24) - zlib (12)
クラス
-
ARGF
. class (12) -
Benchmark
:: Tms (12) - Date (12)
-
Encoding
:: Converter (48) -
Gem
:: Format (24) -
Gem
:: Installer (12) -
Gem
:: OldFormat (72) -
Gem
:: Platform (132) -
Gem
:: SourceIndex (12) -
Gem
:: SourceInfoCache (24) -
Gem
:: SpecFetcher (24) -
Gem
:: Specification (48) - Hash (48)
- IO (12)
-
IRB
:: Context (12) - Logger (48)
-
Logger
:: Formatter (36) -
Net
:: HTTP (72) -
OpenSSL
:: PKey :: EC :: Group (24) -
RDoc
:: Options (24) -
REXML
:: Formatters :: Default (12) -
REXML
:: Formatters :: Pretty (48) -
RSS
:: NotWellFormedError (24) -
Scanf
:: FormatSpecifier (6) -
Scanf
:: FormatString (24) - String (33)
- StringIO (12)
-
Syslog
:: Logger (24) -
Syslog
:: Logger :: Formatter (12) - Time (12)
-
WEBrick
:: HTTPUtils :: FormData (132) -
WEBrick
:: Log (24) -
Zlib
:: GzipWriter (12)
モジュール
-
CGI
:: HtmlExtension (96) - DublinCoreModel (36)
- Exception2MessageMapper (12)
-
Gem
:: VersionOption (12) - Kernel (24)
-
Net
:: HTTPHeader (12) -
OpenSSL
:: Buffering (12)
キーワード
- << (12)
- == (12)
- === (12)
- =~ (12)
- [] (12)
-
add
_ platform _ option (12) -
append
_ data (12) - call (24)
- compact (12)
- compact= (12)
-
content
_ type (12) - cpu (12)
- cpu= (12)
-
datetime
_ format (24) -
datetime
_ format= (24) -
dc
_ format (12) -
dc
_ format= (12) -
dc
_ formats (12) -
def
_ exception (6) -
each
_ data (12) - element (12)
- fetch (12)
-
file
_ entries (24) -
file
_ entries= (24) - filename (12)
- filename= (12)
-
find
_ matching (12) - format (12)
-
formatted
_ program _ filename (12) - formatter (36)
- formatter= (36)
-
gem
_ path (12) -
gem
_ path= (12) -
last
_ match _ tried (6) -
last
_ spec (6) -
last
_ spec _ tried (6) - letter (6)
- line (12)
- list (12)
-
multipart
_ form (48) - name (12)
- name= (12)
-
original
_ platform (12) -
original
_ platform= (12) - os (12)
- os= (12)
- platform (12)
- platform= (12)
-
point
_ conversion _ form (12) -
point
_ conversion _ form= (12) - post (24)
- post2 (24)
-
primitive
_ convert (48) - printf (60)
-
request
_ post (24) -
return
_ format= (12) - scanf (12)
- search (24)
-
search
_ with _ source (12) - spec (12)
- spec= (12)
- strftime (24)
-
string
_ left (6) -
time
_ format (12) -
time
_ format= (12) -
to
_ a (12) -
to
_ ary (12) -
to
_ s (24) -
transform
_ keys! (12) -
transform
_ values (18) -
transform
_ values! (18) -
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - version (12)
- version= (12)
- width (12)
- width= (12)
- write (12)
検索結果
先頭5件
- Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol - Net
:: HTTPHeader # content _ type -> String|nil - Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse - Net
:: HTTP # post2(path , data , header = nil) -> Net :: HTTPResponse
-
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (113.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding......TER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc......et
when :invalid_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
e... -
Net
:: HTTPHeader # content _ type -> String|nil (113.0) -
"text/html" のような Content-Type を表す 文字列を返します。
..."text/html" のような Content-Type を表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post.......new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data'
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (107.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボ......ィ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, 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-... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (107.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
dest は時代遅れの引数です。利用しないでください。
dest を指定した場合には
ボ......ィ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, 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-... -
Net
:: HTTP # post2(path , data , header = nil) -> Net :: HTTPResponse (107.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...るエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } と......ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデ......post2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read
# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|resp... -
Net
:: HTTP # post2(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse (107.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...るエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } と......ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデ......post2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read
# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|resp... -
Net
:: HTTP # request _ post(path , data , header = nil) -> Net :: HTTPResponse (107.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...るエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } と......ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデ......post2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read
# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|resp... -
Net
:: HTTP # request _ post(path , data , header = nil) {|response| . . . . } -> Net :: HTTPResponse (107.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。
...るエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } と......ダに Content-Type: を指定する必要があります。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。
@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデ......post2 は時代遅れなので使わないでください。
//emlist[例][ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts response.body # body is already read
# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|resp...