Page Speed Optimization Libraries  1.4.26.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
net_instaweb::ExternalUrlFetcher Class Reference

#include "external_url_fetcher.h"

Inheritance diagram for net_instaweb::ExternalUrlFetcher:
net_instaweb::UrlFetcher net_instaweb::WgetUrlFetcher

List of all members.

Public Member Functions

virtual bool StreamingFetchUrl (const GoogleString &url, const RequestHeaders &request_headers, ResponseHeaders *response_headers, Writer *writer, MessageHandler *message_handler, const RequestContextPtr &request_context)
void set_binary (const GoogleString &binary)
 Sets the path to "binary" when fetching using "how".

Static Public Attributes

static const char kDefaultUserAgent []
 Default user agent to use.

Protected Member Functions

virtual void AppendHeaders (const RequestHeaders &request_headers, StringVector *escaped_headers)

Protected Attributes

GoogleString binary_

Detailed Description

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

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

Member Function Documentation

virtual void net_instaweb::ExternalUrlFetcher::AppendHeaders ( const RequestHeaders request_headers,
StringVector *  escaped_headers 
) [protected, virtual]

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

virtual bool net_instaweb::ExternalUrlFetcher::StreamingFetchUrl ( const GoogleString url,
const RequestHeaders request_headers,
ResponseHeaders response_headers,
Writer writer,
MessageHandler message_handler,
const RequestContextPtr request_context 
) [virtual]
Todo:
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::UrlFetcher.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines