別のキーワード
ライブラリ
- ビルトイン (288)
- csv (36)
- mkmf (12)
-
net
/ http (684) - optparse (36)
-
rake
/ packagetask (180) -
rexml
/ document (252) - socket (36)
- stringio (48)
- strscan (36)
クラス
-
ARGF
. class (60) - Addrinfo (24)
- Binding (48)
- CSV (36)
- Exception (24)
- Module (24)
-
Net
:: HTTP (156) -
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (108) - Object (48)
- OptionParser (24)
-
REXML
:: Attribute (36) -
REXML
:: Attributes (144) -
REXML
:: Element (60) -
REXML
:: Instruction (12) -
Rake
:: PackageTask (180) - Socket (12)
- String (12)
- StringIO (48)
- StringScanner (36)
- Thread (24)
- Time (48)
モジュール
- Kernel (12)
-
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (372) -
OptionParser
:: Arguable (12)
キーワード
- == (12)
- [] (36)
- []= (24)
-
add
_ field (12) - attribute (12)
-
backtrace
_ locations (12) -
basic
_ auth (12) - body (12)
- chunked? (12)
-
class
_ variable _ get (12) - code (12)
- connect (12)
-
connect
_ from (24) -
const
_ get (12) -
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type= (12) -
create
_ makefile (12) - delete (24)
-
delete
_ all (12) - each (24)
-
each
_ attribute (12) -
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) -
each
_ value (12) - entity (12)
- eval (12)
- fetch (36)
-
form
_ data= (12) - get2 (24)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ byte (12) -
get
_ fields (12) -
get
_ text (12) - getbyte (48)
- getc (24)
- getch (12)
- getgm (12)
- getlocal (24)
- getopts (36)
- gets (60)
- getutc (12)
- head2 (24)
-
http
_ version (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) - key? (12)
- length (12)
-
local
_ host= (12) -
local
_ port= (12) -
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
main
_ type (12) - method (24)
- msg (12)
- name (12)
- name= (12)
- namespace (12)
- namespaces (12)
-
need
_ tar (12) -
need
_ tar= (12) -
need
_ tar _ bz2 (12) -
need
_ tar _ bz2= (12) -
need
_ tar _ gz (12) -
need
_ tar _ gz= (12) -
need
_ zip (12) -
need
_ zip= (12) -
package
_ dir (12) -
package
_ dir= (12) -
package
_ dir _ path (12) -
package
_ files (12) -
package
_ files= (12) - path (12)
- prefix (12)
- prefixes (12)
-
proxy
_ basic _ auth (12) - range (12)
-
range
_ length (12) -
read
_ body (24) - readline (12)
-
request
_ get (24) -
request
_ head (24) - response (12)
-
response
_ body _ permitted? (12) - root (12)
-
root
_ node (12) -
send
_ request (12) -
set
_ content _ type (12) -
set
_ form _ data (12) - shift (12)
- size (12)
-
sub
_ type (12) - target (12)
- text (12)
-
thread
_ variable _ set (12) -
to
_ string (12) -
type
_ params (12) - ungetc (12)
- value (12)
検索結果
先頭5件
-
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (18139.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...ist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/'......, nil) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (18139.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...ist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/'......, nil) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
StringScanner
# get _ byte -> String | nil (6156.0) -
1 バイトスキャンして文字列で返します。 スキャンポインタをその後ろに進めます。 スキャンポインタが文字列の末尾を指すなら nil を返します。
...Scanner#getbyte は将来のバージョンで削除される予定です。
代わりに StringScanner#get_byte を使ってください。
//emlist[例][ruby]{
require 'strscan'
utf8 = "\u{308B 3073 3044}"
s = StringScanner.new(utf8.encode("EUC-JP"))
p s.get_byte #=> "\xA4"
p s.get_byte......#=> "\xEB"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xD3"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xA4"
p s.get_byte #=> nil
//}... -
StringScanner
# getbyte -> String | nil (6156.0) -
1 バイトスキャンして文字列で返します。 スキャンポインタをその後ろに進めます。 スキャンポインタが文字列の末尾を指すなら nil を返します。
...Scanner#getbyte は将来のバージョンで削除される予定です。
代わりに StringScanner#get_byte を使ってください。
//emlist[例][ruby]{
require 'strscan'
utf8 = "\u{308B 3073 3044}"
s = StringScanner.new(utf8.encode("EUC-JP"))
p s.get_byte #=> "\xA4"
p s.get_byte......#=> "\xEB"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xD3"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xA4"
p s.get_byte #=> nil
//}... -
Module
# const _ get(name , inherit = true) -> object (6138.0) -
name で指定される名前の定数の値を取り出します。
...す。
//emlist[例][ruby]{
module Bar
BAR = 1
end
class Object
include Bar
end
# Object では include されたモジュールに定義された定数を見付ける
p Object.const_get(:BAR) # => 1
class Baz
include Bar
end
# Object以外でも同様
p Baz.const_get(:BAR) # => 1
#......定義されていない定数
p Baz.const_get(:NOT_DEFINED) #=> raise NameError
# 第二引数に false を指定すると自分自身に定義された定数から探す
p Baz.const_get(:BAR, false) #=> raise NameError
# 完全修飾名を指定すると include や自分自身へ定義されて......いない場合でも参照できる
p Class.const_get("Bar::BAR") # => 1
//}... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (6138.0) -
namespace と name で特定される属性を返します。
...字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
a.attributes.get_attribute_ns("", "at......t") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}... -
Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse (6135.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
respon......se.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (6135.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
respon......se.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # request _ get(path , header = nil) -> Net :: HTTPResponse (6135.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
respon......se.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body...