4 #include "IAssetRequest.h"
27 typedef std::pair<std::string, std::string>
THeader;
42 const std::string& url,
43 const std::vector<THeader>& headers = {}) = 0;
60 const std::string& verb,
61 const std::string& url,
62 const std::vector<THeader>& headers = std::vector<THeader>(),
63 const gsl::span<const std::byte>& contentPayload = {}) = 0;
71 virtual void tick() noexcept = 0;
A system for managing asynchronous requests and tasks.
A value that will be available in the future, as produced by AsyncSystem.
Provides asynchronous access to assets, usually files downloaded via HTTP.
virtual CesiumAsync::Future< std::shared_ptr< IAssetRequest > > request(const AsyncSystem &asyncSystem, const std::string &verb, const std::string &url, const std::vector< THeader > &headers=std::vector< THeader >(), const gsl::span< const std::byte > &contentPayload={})=0
Starts a new request to the given URL, using the provided HTTP verb and the provided content payload.
virtual void tick() noexcept=0
Ticks the asset accessor system while the main thread is blocked.
std::pair< std::string, std::string > THeader
An HTTP header represented as a key/value pair.
virtual CesiumAsync::Future< std::shared_ptr< IAssetRequest > > get(const AsyncSystem &asyncSystem, const std::string &url, const std::vector< THeader > &headers={})=0
Starts a new request for the asset with the given URL. The request proceeds asynchronously without bl...
Classes that support asynchronous operations.