[public] Move HTTPClient interface into //src/public/lib

It is the only part of clearcut used outside of cobalt core

Change-Id: Ia5937100acf0fd5e552aec3754aacb344f26bc64
Reviewed-on: https://fuchsia-review.googlesource.com/c/cobalt/+/494964
Reviewed-by: Cameron Dale <camrdale@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Fuchsia-Auto-Submit: Zach Bush <zmbush@google.com>
diff --git a/.gitignore b/.gitignore
index 01bd3b8..4840f0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@
 compile_commands.json
 .clangd
 .cache
+.vscode
diff --git a/src/lib/clearcut/BUILD.gn b/src/lib/clearcut/BUILD.gn
index 7683ffe..a248350 100644
--- a/src/lib/clearcut/BUILD.gn
+++ b/src/lib/clearcut/BUILD.gn
@@ -15,7 +15,6 @@
 
 source_set("clearcut") {
   sources = [
-    "http_client.h",
     "uploader.cc",
     "uploader.h",
   ]
@@ -28,6 +27,7 @@
     "$cobalt_root/src/lib/util:sleeper",
     "$cobalt_root/src/lib/util:status",
     "$cobalt_root/src/logger:internal_metrics",
+    "$cobalt_root/src/public/lib:http_client",
     "//third_party/abseil-cpp",
   ]
   visibility += [ "//src/cobalt/bin/utils:fuchsia_http_client" ]
diff --git a/src/lib/clearcut/http_client.h b/src/lib/clearcut/http_client.h
new file mode 120000
index 0000000..f779ca6
--- /dev/null
+++ b/src/lib/clearcut/http_client.h
@@ -0,0 +1 @@
+../../../src/public/lib/http_client.h
\ No newline at end of file
diff --git a/src/public/lib/BUILD.gn b/src/public/lib/BUILD.gn
new file mode 100644
index 0000000..b9fe0da
--- /dev/null
+++ b/src/public/lib/BUILD.gn
@@ -0,0 +1,7 @@
+source_set("http_client") {
+  sources = [ "http_client.h" ]
+  deps = [
+    "$cobalt_root/src/lib/statusor",
+    "$cobalt_root/src/lib/util:status",
+  ]
+}
diff --git a/src/lib/clearcut/http_client.h b/src/public/lib/http_client.h
similarity index 88%
rename from src/lib/clearcut/http_client.h
rename to src/public/lib/http_client.h
index bac0644..d595673 100644
--- a/src/lib/clearcut/http_client.h
+++ b/src/public/lib/http_client.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef COBALT_SRC_LIB_CLEARCUT_HTTP_CLIENT_H_
-#define COBALT_SRC_LIB_CLEARCUT_HTTP_CLIENT_H_
+#ifndef COBALT_SRC_PUBLIC_LIB_HTTP_CLIENT_H_
+#define COBALT_SRC_PUBLIC_LIB_HTTP_CLIENT_H_
 
 #include <future>
 #include <map>
@@ -11,7 +11,7 @@
 #include "src/lib/statusor/statusor.h"
 #include "src/lib/util/status.h"
 
-namespace cobalt::lib::clearcut {
+namespace cobalt::lib {
 
 using cobalt::util::Status;
 using lib::statusor::StatusOr;
@@ -81,6 +81,13 @@
   virtual ~HTTPClient() = default;
 };
 
+}  // namespace cobalt::lib
+
+// TODO(zmbush) Remove alias once it is no longer used
+namespace cobalt::lib::clearcut {
+using HTTPClient = HTTPClient;
+using HTTPRequest = HTTPRequest;
+using HTTPResponse = HTTPResponse;
 }  // namespace cobalt::lib::clearcut
 
-#endif  // COBALT_SRC_LIB_CLEARCUT_HTTP_CLIENT_H_
+#endif  // COBALT_SRC_PUBLIC_LIB_HTTP_CLIENT_H_