84件ヒット
[1-84件を表示]
(0.093秒)
ライブラリ
- mkmf (12)
-
net
/ http (48) - openssl (12)
-
rubygems
/ remote _ fetcher (12)
クラス
-
Gem
:: RemoteFetcher (12) -
Net
:: HTTP (24) -
Net
:: HTTPResponse (24) -
OpenSSL
:: SSL :: SSLContext (12)
モジュール
- Kernel (12)
キーワード
-
create
_ makefile (12) -
get
_ file _ uri _ path (12) -
read
_ body (24) -
set
_ params (12)
検索結果
先頭5件
- Gem
:: RemoteFetcher # get _ file _ uri _ path(uri) -> String - Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse - Kernel
# create _ makefile(target , srcprefix = nil) -> true - Net
:: HTTPResponse # read _ body {|str| . . . . } -> ()
-
Gem
:: RemoteFetcher # get _ file _ uri _ path(uri) -> String (18320.0) -
与えられた URI から "file://" を取り除いた文字列を返します。
...与えられた URI から "file://" を取り除いた文字列を返します。
@param uri URI を表す文字列を指定します。... -
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (18263.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...サーバ上の path にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......さい。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの 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.writ... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (18263.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...サーバ上の path にあるエンティティを取得し、
Net::HTTPResponse のインスタンスとして返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という......さい。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの 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.writ... -
Kernel
# create _ makefile(target , srcprefix = nil) -> true (6207.0) -
@todo
...どの各種検査の結果を元に、拡張ライブラリを
ビルドするための Makefile を生成します。
extconf.rb は普通このメソッドの呼び出しで終ります。
@param target ターゲットとなる拡張ライブラリの名前を指定します。......として使用します。残りはトップレベルのディレクトリ名と見
なされ、生成された Makefile はそのディレクトリ構造に従い
ます。
例えば、'test/foo' を指定した場合、拡張ライブラリ......test/
foo.c
このようにします。
require 'mkmf'
create_makefile('test/foo', 'test')
このようにして作った Makefile で 'make install' すると拡張ライブラリは、
以下のパスにインストールされます。
/path/to/ruby/sitearchdir/test/foo.so... -
Net
:: HTTPResponse # read _ body {|str| . . . . } -> () (61.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
....get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/path/to/big.file')
Net::HTTP.start(uri.host, uri.port) do |http|
File.open("/path....../to/big.file", "w") do |f|
# Net::HTTP#request_get と Net::HTTPResponse#read_body で少しずつ読み書き。メモリ消費が少ない。
http.request_get(uri.path) do |response|
response.read_body do |s|
f.write(s)
end
end
end
end
//}
一度ブロックを......い。
dest は obsolete です。使わないでください。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。
@param dest obsoleteな引数です。利用しないでください。
@see Net::HTTP#request_get... -
Net
:: HTTPResponse # read _ body(dest=nil) -> String|nil (61.0) -
ブロックを与えなかった場合にはエンティティボディを 文字列で返します。 ブロックを与えた場合には エンティティボディを少しずつ取得して順次ブロックに 文字列で与えます。
....get_response(URI.parse(uri))
response.read_body[0..10] # => "<!doctype h"
//}
//emlist[例2 ブロックを与えて大きいファイルを取得][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/path/to/big.file')
Net::HTTP.start(uri.host, uri.port) do |http|
File.open("/path....../to/big.file", "w") do |f|
# Net::HTTP#request_get と Net::HTTPResponse#read_body で少しずつ読み書き。メモリ消費が少ない。
http.request_get(uri.path) do |response|
response.read_body do |s|
f.write(s)
end
end
end
end
//}
一度ブロックを......い。
dest は obsolete です。使わないでください。
dest を指定した場合には
ボディを少しずつ取得して順次
「dest << ボディの断片」を実行します。
@param dest obsoleteな引数です。利用しないでください。
@see Net::HTTP#request_get... -
OpenSSL
:: SSL :: SSLContext # set _ params(params) -> Hash (37.0) -
パラメータをハッシュで設定します。
...rt=)
* :key (OpenSSL::SSL::SSLContext#key=)
* :client_ca (OpenSSL::SSL::SSLContext#client_ca=)
* :ca_file (OpenSSL::SSL::SSLContext#ca_file=)
* :ca_path (OpenSSL::SSL::SSLContext#ca_path=)
* :timeout (OpenSSL::SSL::SSLContext#timeout=)
* :verify_mode (OpenSSL::SSL::SSLContext#verify_mode......(OpenSSL::SSL::SSLContext#tmp_dh_callback=)
* :session_id_context (OpenSSL::SSL::SSLContext#session_id_context=)
* :session_get_cb (OpenSSL::SSL::SSLContext#session_get_cb=)
* :session_new_cb (OpenSSL::SSL::SSLContext#session_new_cb=)
* :session_remove_cb (OpenSSL::SSL::SSLContext#session_re...