16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_HTTPCONTENTFETCHERINTERFACE_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_HTTPCONTENTFETCHERINTERFACE_H_ 23 #include <AVSCommon/Utils/SDKVersion.h> 27 namespace sdkInterfaces {
130 virtual bool getBody(std::shared_ptr<avsCommon::avs::attachment::AttachmentWriter> writer) = 0;
145 virtual std::unique_ptr<avsCommon::utils::HTTPContent>
getContent(
147 std::unique_ptr<avsCommon::avs::attachment::AttachmentWriter> writer =
nullptr,
148 const std::vector<std::string>& customHeaders = std::vector<std::string>()) = 0;
172 return "INITIALIZED";
174 return "FETCHING_HEADER";
176 return "HEADER_DONE";
178 return "FETCHING_BODY";
203 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_HTTPCONTENTFETCHERINTERFACE_H_
std::ostream & operator<<(std::ostream &stream, const AudioInputProcessorObserverInterface::State &state)
Definition: AudioInputProcessorObserverInterface.h:94
Currently fetching the body.
HTTPResponseCode
Definition: HttpResponseCode.h:29
Definition: HTTPContentFetcherInterface.h:32
::std::string string
Definition: gtest-port.h:1097
virtual std::unique_ptr< avsCommon::utils::HTTPContent > getContent(FetchOptions option, std::unique_ptr< avsCommon::avs::attachment::AttachmentWriter > writer=nullptr, const std::vector< std::string > &customHeaders=std::vector< std::string >())=0
Done fetching the body. At this point the content fetcher can only be used to read the headers...
static std::string getUserAgent()
Definition: HTTPContentFetcherInterface.h:165
virtual std::string getEffectiveUrl() const =0
virtual std::string getUrl() const =0
virtual void shutdown()=0
No HTTP response received.
Definition: HttpResponseCodes.h:29
Some error happened at any stage and the content fetcher cannot be used anymore.
HTTPResponseCode
Definition: HttpResponseCodes.h:27
State
The state of payload fetching.
Definition: HTTPContentFetcherInterface.h:43
Retrieves the content type part of the HTTP header.
virtual ~HTTPContentFetcherInterface()=default
Currently fetching the header.
virtual Header getHeader(std::atomic< bool > *shouldShutdown)=0
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Retrieves the entire body of the remote location.
FetchOptions
Represents what HTTP content to fetch.
Definition: HTTPContentFetcherInterface.h:35
virtual bool getBody(std::shared_ptr< avsCommon::avs::attachment::AttachmentWriter > writer)=0
Done fetching the header. Ready to start fetching the body.
static std::string stateToString(State state)
Definition: HTTPContentFetcherInterface.h:169
virtual State getState()=0
Initialized but nothing was downloaded yet.
static std::string getCurrentVersion()
Definition: SDKVersion.h.in:31