http_request: Reset the content_reader in AttemptToExecute()

This resolves

The problem is that when the server returns a 401 UNAUTHORIZED and
the client performs the upload a second time, it needs to reset
the content_reader.

Change-Id: I9279b2a8113d42e9c1e91a2aef8c86c5a58bb26a
1 file changed
tree: b5f5ecf4a3d54bf8278b5de8c22decd7c3e1d244
  1. .gitignore
  2. CMakeLists.txt
  3. COPYING.txt
  5. doxygen.config
  7. introspect.cmake
  9. service_apis/
  10. src/

Google API C++ Client

The current installation has only been tested on Unix/Linux systems; this release does not support Windows yet. The following sequence of actions should result in a turnkey build of the client libraries from the source code given only:



Build Steps:

mkdir build && cd build
../external_dependencies/install/bin/cmake ..

Running the Samples

See src/samples/

Building Clients for Other APIs

To download additional APIs specialized for individual Google Services see: and use this precise version of the apis client generator:

Here's an example invocation:

$ python apis-client-generator/src/googleapis/codegen/ --api_name=drive --api_version=v2 --language=cpp --output_dir=/tmp/generated

It should be possible to build this from existing installed libraries. However, the build scripts are not yet written to find them. For initial support simplicity we download and build all the dependencies in the script for the time being as a one-time brute force preparation.

Getting Help

If you have problems, questions or suggestions, contact: The Google group at

Or you may also ask questions on StackOverflow at: with the tag google-api-cpp-client


This SDK is in maintanance mode. The patches being made are mostly for portability and/or to remove unneeded pieces.

We are not set up to accept pull requests at this time, nor will be in the forseable future. Please submit suggestions as issues.

About the branches

The master branch is where development is done. It usually is compatible with the generated libraries available from from On occasion it gets aheaad of those. It usually catches up in a few days.

The latest generated libraries for any Google API is available automatically from

For example, for Drive/v2, you would use