るりまサーチ

最速Rubyリファレンスマニュアル検索!
1141件ヒット [1-100件を表示] (0.030秒)

別のキーワード

  1. net/http get
  2. http get
  3. http start
  4. net/http start
  5. net/http patch

モジュール

検索結果

<< 1 2 3 ... > >>

Net::HTTPGenericRequest#path -> String (21141.0)

リクエストする path を文字列で返します。

...リクエストする path を文字列で返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.path # => "/index.html"
//}...

WEBrick::HTTPRequest#path -> String (21101.0)

リクエスト URI のパスを表す文字列を返します。

リクエスト URI のパスを表す文字列を返します。

URI::Generic#path -> String | nil (18159.0)

自身の path を文字列で返します。設定されていない場合は nil を返します。

...自身の path を文字列で返します。設定されていない場合は nil を返します。

require 'uri'
p URI.parse('http://example.com/hoge').path #=> "/hoge"
p URI.parse('http://example.com').path #=> ""
p URI.parse('mailto:nospam@localhost').path #=> n...
...il
p URI('ftp://example.com/foo').path #=> 'foo'
p URI('ftp://example.com/%2Ffoo').path #=> '/foo'...

Net::HTTP#ca_path=(path) (9232.0)

信頼する CA 証明書ファイルが存在するディレクトリを設定します。

...イル名はハッシュ値の文字列にしなければなりません。
詳しくは OpenSSL::SSL::SSLContext#ca_path= を見てください。

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

@param path ディレクトリ名文字列
@see Net::HTTP#ca_path, OpenSSL::SSL::SSLContext#ca_path=...

Net::HTTP#ca_path -> String | nil (9119.0)

信頼する CA 証明書ファイルが存在するディレクトリを設定します。

...信頼する CA 証明書ファイルが存在するディレクトリを設定します。

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

絞り込み条件を変える

WEBrick::HTTPRequest#path_info -> String (9117.0)

リクエスト URI のパスを文字列で返します。デフォルトは path と同じです。

...リクエスト URI のパスを文字列で返します。デフォルトは path と同じです。...

WEBrick::HTTPRequest#path_info=(value) (9101.0)

リクエスト URI のパスをセットします。

リクエスト URI のパスをセットします。

@param value リクエスト URI のパスを指定します。

WEBrick::HTTPUtils.#escape_path(str) -> String (9101.0)

与えられた文字列を数値参照文字列に変換します。

与えられた文字列を数値参照文字列に変換します。

以下の正規表現を使用して変換します。

num = '0123456789'
lowalpha = 'abcdefghijklmnopqrstuvwxyz'
upalpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
mark = '-_.!~*\'()'
unreserved = num + lowalpha + upalpha + mark
/[^#{Regexp.escape(unreserved + ":@&=+$,")}]/n

@param str 文字列を指定します。...

net/http (6304.0)

汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。

...データ転送プロトコル HTTP を扱うライブラリです。
実装は 2616 に基きます。

=== 使用例

==== ウェブサーバからドキュメントを得る (GET)

//emlist[例1: GET して 表示するだけ][ruby]{
require 'net/http'
print Net::HTTP.get('www.example.com', '/ind...
...uire 'net/http'
require 'uri'
print Net::HTTP.get(URI.parse('http://www.example.com/index.html'))
//}

//emlist[例3: より汎用的な例][ruby]{
require 'net/http'
require 'uri'

url = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.start(url.host, url.port) {|http|
http
.get('/in...
...require 'net/http'

url = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(url.path)
res = Net::HTTP.start(url.host, url.port) {|http|
http
.request(req)
}
puts res.body
//}

==== フォームの情報を送信する (POST)

//emlist[例][ruby]{
require 'net/http'
require 'ur...
<< 1 2 3 ... > >>