Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
net_instaweb::ExternalUrlFetcher Class Referenceabstract

#include "external_url_fetcher.h"

Inheritance diagram for net_instaweb::ExternalUrlFetcher:
net_instaweb::UrlAsyncFetcher net_instaweb::WgetUrlFetcher

Public Member Functions

virtual void Fetch (const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch)
void set_binary (const GoogleString &binary)
 Sets the path to "binary" when fetching using "how".
- Public Member Functions inherited from net_instaweb::UrlAsyncFetcher
virtual bool SupportsHttps () const
virtual int64 timeout_ms ()
virtual void ShutDown ()
void set_fetch_with_gzip (bool x)
bool fetch_with_gzip () const
AsyncFetchEnableInflation (AsyncFetch *fetch) const

Static Public Attributes

static const char kDefaultUserAgent []
 Default user agent to use.
- Static Public Attributes inherited from net_instaweb::UrlAsyncFetcher
static const int64 kUnspecifiedTimeout

Protected Member Functions

virtual void AppendHeaders (const RequestHeaders &request_headers, StringVector *escaped_headers)
- Protected Member Functions inherited from net_instaweb::UrlAsyncFetcher
 UrlAsyncFetcher ()

Protected Attributes

GoogleString binary_

Detailed Description

Runs an external command ('wget' by default, or 'curl') via popen for blocking URL fetches.

TODO(vchudnov): Incorporate NetcatUrlFetcher functionality into this class.

Member Function Documentation

virtual void net_instaweb::ExternalUrlFetcher::AppendHeaders ( const RequestHeaders request_headers,
StringVector *  escaped_headers 

Appends to escaped_headers one header line for each Name, Value pair in request_headers.

virtual void net_instaweb::ExternalUrlFetcher::Fetch ( const GoogleString url,
MessageHandler message_handler,
AsyncFetch fetch 
TODO(sligocki): Allow protocol version number (e.g. HTTP/1.1) and request type (e.g. GET, POST, etc.) to be specified.

Implements net_instaweb::UrlAsyncFetcher.

The documentation for this class was generated from the following file: