るりまサーチ

最速Rubyリファレンスマニュアル検索!
66件ヒット [1-66件を表示] (0.023秒)
トップページ > クエリ:http[x] > クエリ:last_modified[x]

別のキーワード

  1. _builtin last
  2. regexp last_match
  3. range last
  4. _builtin last_match
  5. fiddle last_error=

ライブラリ

クラス

モジュール

キーワード

検索結果

OpenURI::Meta#last_modified -> Time | nil (18113.0)

対象となる URI の最終更新時刻を Time オブジェクトで返します。 Last-Modified ヘッダがない場合は nil を返します。

...対象となる URI の最終更新時刻を Time オブジェクトで返します。
Last-Modified ヘッダがない場合は nil を返します。

例:
//emlist[例][ruby]{
require 'open-uri'
open('http://www.rubyist.net/') {|f|
p f.last_modified
#=> Thu Feb 26 16:54:58 +0900 2004
}
//}...
...象となる URI の最終更新時刻を Time オブジェクトで返します。
Last-Modified ヘッダがない場合は nil を返します。

例:
//emlist[例][ruby]{
require 'open-uri'
URI.open('http://www.rubyist.net/') {|f|
p f.last_modified
#=> Thu Feb 26 16:54:58 +0900 2004
}
//}...

Gem::RemoteFetcher#request(uri, request_class, last_modified = nil) -> Net::HTTPResponse (237.0)

与えられた URI に対してリクエストを実行し、Net::HTTPResponse を返します。

...てリクエストを実行し、Net::HTTPResponse を返します。

@param uri URI を指定します。

@param request_class Net::HTTP::Head か Net::HTTP::Get を指定します。

@param last_modified 最終更新時刻を指定します。

@see Net::HTTP, Net::HTTP::Head, Net::HTTP::Get...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) -> StringIO (144.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...n_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic...
...http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定しています。

require 'open-uri'
sio = OpenURI.open_uri('http...
...{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列: "http://proxy.example.com:800...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) {|sio| ... } -> nil (144.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

...n_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|sio| sio.read }

options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic...
...http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定しています。

require 'open-uri'
sio = OpenURI.open_uri('http...
...{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列: "http://proxy.example.com:800...

Gem::RemoteFetcher#open_uri_or_path(uri, last_modified = nil, head = false, depth = 0) -> StringIO | File (113.0)

@param uri URI を指定します。

...@param uri URI を指定します。

@param last_modified 最終更新時刻を指定します。

@param head 真を指定するとヘッダ情報のみ取得します。

@param depth 現在のリダイレクト回数を指定します。

@raise Gem::RemoteFetcher::FetchError デフォルトで...
...は 11 回リダイレクトした場合に発生します。
depth を指定すると 10 - depth 回より多くリダイレクトした場合にこの例外が発生するようになります。
また HTTP のレスポンスが想定外のものの場合にも発生します。...

絞り込み条件を変える

open-uri (88.0)

http/ftp に簡単にアクセスするためのクラスです。 Kernel.#open を再定義します。

...http/ftp に簡単にアクセスするためのクラスです。
Kernel.#open を再定義します。

=== 使用例

http
/ftp の URL を、普通のファイルのように開けます。

require 'open-uri'
open("http://www.ruby-lang.org/") {|f|
f.each_line {|line| p line}
}

開い...
...i'
open("http://www.ruby-lang.org/en") {|f|
f.each_line {|line| p line}
p f.base_uri # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>
p f.content_type # "text/html"
p f.charset # "iso-8859-1"
p f.content_encoding # []
p f.last_modified # Thu...
...ルドを指定できます。

require 'open-uri'
open("http://www.ruby-lang.org/en/",
"User-Agent" => "Ruby/#{RUBY_VERSION}",
"From" => "foo@bar.invalid",
"Referer" => "http://www.ruby-lang.org/") {|f|
...
}

http
_proxy や ftp_proxy などの環境変数は、デフォルト...
...http/ftp に簡単にアクセスするためのクラスです。

=== 使用例

http
/ftp の URL を、普通のファイルのように開けます。

require 'open-uri'
URI.open("http://www.ruby-lang.org/") {|f|
f.each_line {|line| p line}
}

開いたファイルオブジェクト...
...URI.open("http://www.ruby-lang.org/en") {|f|
f.each_line {|line| p line}
p f.base_uri # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>
p f.content_type # "text/html"
p f.charset # "iso-8859-1"
p f.content_encoding # []
p f.last_modified # Thu...
...ドを指定できます。

require 'open-uri'
URI.open("http://www.ruby-lang.org/en/",
"User-Agent" => "Ruby/#{RUBY_VERSION}",
"From" => "foo@bar.invalid",
"Referer" => "http://www.ruby-lang.org/") {|f|
...
}

http
_proxy や ftp_proxy などの環境変数は、デフォル...