36件ヒット
[1-36件を表示]
(0.016秒)
検索結果
先頭3件
-
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (27.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...//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-bin/search.rb', 'query=... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (27.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...//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-bin/search.rb', 'query=... -
Net
:: HTTPHeader # content _ type -> String|nil (25.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...