Method: OpenGraphReader::Fetcher#html?
- Defined in:
- lib/open_graph_reader/fetcher.rb
#html? ⇒ Bool
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Whether the target URI seems to return HTML
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/open_graph_reader/fetcher.rb', line 82 def html? fetch_headers unless fetched_headers? response = @get_response || @head_response return false if fetch_failed? return false unless response return false unless response.success? return false unless response["content-type"] response["content-type"].include? "text/html" end |