Index: http_fetcher.h |
diff --git a/http_fetcher.h b/http_fetcher.h |
index 5cd6f08559fc33976cd70be8d81953f45a869f8c..f8e510a61d4c7fd241a8b3f28e0317eb9deea145 100644 |
--- a/http_fetcher.h |
+++ b/http_fetcher.h |
@@ -23,14 +23,15 @@ class HttpFetcherDelegate; |
class HttpFetcher { |
public: |
- HttpFetcher() : post_data_set_(false), delegate_(NULL) {} |
+ HttpFetcher() |
+ : post_data_set_(false), |
+ http_response_code_(0), |
+ delegate_(NULL) {} |
virtual ~HttpFetcher() {} |
- void set_delegate(HttpFetcherDelegate* delegate) { |
- delegate_ = delegate; |
- } |
- HttpFetcherDelegate* delegate() const { |
- return delegate_; |
- } |
+ |
+ void set_delegate(HttpFetcherDelegate* delegate) { delegate_ = delegate; } |
+ HttpFetcherDelegate* delegate() const { return delegate_; } |
+ int http_response_code() const { return http_response_code_; } |
// Optional: Post data to the server. The HttpFetcher should make a copy |
// of this data and upload it via HTTP POST during the transfer. |
@@ -66,6 +67,11 @@ class HttpFetcher { |
bool post_data_set_; |
std::vector<char> post_data_; |
+ // The server's HTTP response code from the last transfer. This |
+ // field should be set to 0 when a new transfer is initiated, and |
+ // set to the response code when the transfer is complete. |
+ int http_response_code_; |
+ |
// The delegate; may be NULL. |
HttpFetcherDelegate* delegate_; |
private: |