Module: Tilia::Http::Util Deprecated
- Defined in:
- lib/tilia/http/util.rb
Overview
Deprecated.
All these functions moved to the Tilia::Http namespace
HTTP utility methods
Class Method Summary collapse
-
.negotiate(accept_header_value, available_options) ⇒ String?
deprecated
Deprecated.
Use Tilia::Http::negotiate_content_type
-
.negotiate_content_type(accept_header_value, available_options) ⇒ String?
deprecated
Deprecated.
Use Tilia::Http::negotiate_content_type
-
.parse_http_date(date_header) ⇒ Object
deprecated
Deprecated.
Use Tilia::Http::parse_date
-
.to_http_date(date_time) ⇒ String
deprecated
Deprecated.
Use Tilia::Http::to_date
Class Method Details
.negotiate(accept_header_value, available_options) ⇒ String?
Deprecated.
Use Tilia::Http::negotiate_content_type
Deprecated! Use negotiateContentType.
23 24 25 |
# File 'lib/tilia/http/util.rb', line 23 def self.negotiate(accept_header_value, ) Http.negotiate_content_type(accept_header_value, ) end |
.negotiate_content_type(accept_header_value, available_options) ⇒ String?
Deprecated.
Use Tilia::Http::negotiate_content_type
Content negotiation
13 14 15 |
# File 'lib/tilia/http/util.rb', line 13 def self.negotiate_content_type(accept_header_value, ) Http.negotiate_content_type(accept_header_value, ) end |
.parse_http_date(date_header) ⇒ Object
Deprecated.
Use Tilia::Http::parse_date
Parses a RFC2616-compatible date string
This method returns false if the date is invalid
34 35 36 |
# File 'lib/tilia/http/util.rb', line 34 def self.parse_http_date(date_header) Http.parse_date(date_header) end |
.to_http_date(date_time) ⇒ String
Deprecated.
Use Tilia::Http::to_date
Transforms a DateTime object to HTTP’s most common date format.
We’re serializing it as the RFC 1123 date, which, for HTTP must be specified as GMT.
46 47 48 |
# File 'lib/tilia/http/util.rb', line 46 def self.to_http_date(date_time) Http.to_date(date_time) end |