libchromeos: Cleaned up HTTP utilities

Renamed http utilities by appending ...AndBlock() to make it
obvious that they are blocking (synchronous) calls. Async I/O
is coming in subsequent CLs.

Replaced a bunch of "const char*" with "const std::string&" in
function prototypes.

Also removed extra overloads for http_utils functions in preparation
for adding asynchronous API which would bloat the overloads even more.
The original overloads were to provide the ability to omit some
less-commonly-used parameters, but that would eventually make the API
harder to choose from since the number of overloads will get out of hand.

Swept the code to remove unnecessary calls to std::string::c_str() and
added omitted parameters in calls to http_utils functions.

TEST=FEATURES=test emerge-link libchromeos peerd privetd feedback metrics buffet

Change-Id: I9c1721cd2179ba3b389dd94ef181370eec98ed2e
Tested-by: Alex Vakulenko <>
Reviewed-by: Vitaly Buka <>
Reviewed-by: Christopher Wiley <>
Commit-Queue: Alex Vakulenko <>
1 file changed
tree: 1bac70b204c3ae3d7b9d31856ddaae41277a1f13
  1. metrics/