るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
7件ヒット [1-7件を表示] (0.029秒)
トップページ > バージョン:2.7.0[x] > クエリ:File[x] > クラス:Net::HTTP[x]

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file open
  4. base file
  5. file size

ライブラリ

キーワード

検索結果

Net::HTTP#ca_file=(path) (18361.0)

信頼する CA 証明書ファイルのパスを文字列で設定します。

...ファイルには複数の証明書を含んでいても構いません。
詳しくは OpenSSL::SSL::SSLContext#ca_file= を見てください。

デフォルトは nil (指定なし)です。

@param path ファイルパス文字列
@see Net::HTTP#ca_file, OpenSSL::SSL::SSLContext#ca_file=...

Net::HTTP#ca_file -> String | nil (18343.0)

信頼する CA 証明書ファイルのパスを返します。

...信頼する CA 証明書ファイルのパスを返します。

@see Net::HTTP#ca_file=, OpenSSL::SSL::SSLContext#ca_file...

Net::HTTP#cert_store=(store) (22.0)

接続相手の証明書の検証のために使う、信頼している CA 証明書を 含む証明書ストアを設定します。

...アを設定します。

通常は Net::HTTP#ca_file= や Net::HTTP#ca_path= で
設定しますが、より詳細な設定をしたい場合にはこちらを用います。

デフォルトは nil (証明書ストアを指定しない)です。

@see Net::HTTP#cert_store=, OpenSSL::SSL::SSLContex...

Net::HTTP#get(path, header = nil, dest = nil) -> Net::HTTPResponse (22.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...サーバ上の path にあるエンティティを取得し、
Net::HTTP
Response のインスタンスとして返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という...
...呼びだされたときは
エンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の
Net::HTTP
Response オブジェクトは有効な body を
持ちません。

dest は時代遅れの引数です。利用しないでください。
dest...
....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 (22.0)

サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。

...サーバ上の path にあるエンティティを取得し、
Net::HTTP
Response のインスタンスとして返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という...
...呼びだされたときは
エンティティボディを少しずつ文字列として
ブロックに与えます。このとき戻り値の
Net::HTTP
Response オブジェクトは有効な body を
持ちません。

dest は時代遅れの引数です。利用しないでください。
dest...
....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#post(path, data, header = nil, dest = nil) -> Net::HTTPResponse (22.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。

返り値は Net::HTTPResponse のインスタンスです。

ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え...
....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
end
}
//}

@see Net::HTTP#request_post...

Net::HTTP#post(path, data, header = nil, dest = nil) {|body_segment| .... } -> Net::HTTPResponse (22.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。

...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。

返り値は Net::HTTPResponse のインスタンスです。

ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え...
....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
end
}
//}

@see Net::HTTP#request_post...