blob: 14390916628bed6c8f5373977a5a2a2637e33dc1 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// 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_CURL_HTTP_CLIENT_H_
#define COBALT_SRC_LIB_CLEARCUT_CURL_HTTP_CLIENT_H_
#include "src/lib/statusor/statusor.h"
#include "src/public/lib/http_client.h"
namespace cobalt::lib::clearcut {
using lib::statusor::StatusOr;
// CurlHTTPClient implements HTTPClient with a curl backend. This is
// a basic implementation that is designed to be used on linux clients (not
// fuchsia).
class CurlHTTPClient : public HTTPClient {
public:
CurlHTTPClient();
StatusOr<HTTPResponse> PostSync(HTTPRequest request,
std::chrono::steady_clock::time_point deadline) override;
static bool global_init_called_;
};
} // namespace cobalt::lib::clearcut
#endif // COBALT_SRC_LIB_CLEARCUT_CURL_HTTP_CLIENT_H_