7#ifndef PACKAGER_MEDIA_BASE_HTTP_KEY_FETCHER_H_
8#define PACKAGER_MEDIA_BASE_HTTP_KEY_FETCHER_H_
14#include <packager/file/http_file.h>
15#include <packager/macros/classes.h>
16#include <packager/media/base/key_fetcher.h>
17#include <packager/status.h>
38 const std::string& request,
39 std::string* response)
override;
46 virtual Status
Get(
const std::string& url, std::string* response);
53 virtual Status
Post(
const std::string& url,
54 const std::string& data,
55 std::string* response);
60 content_type_ = content_type;
65 extra_headers_ = extra_headers;
69 Status FetchInternal(HttpMethod method,
70 const std::string& url,
71 const std::string& data,
72 std::string* response);
74 const int32_t timeout_in_seconds_;
75 std::string content_type_;
76 std::vector<std::string> extra_headers_;
All the methods that are virtual are virtual for mocking.