cesium-native  0.41.0
IAssetRequest.h
1 #pragma once
2 
3 #include "HttpHeaders.h"
4 #include "Library.h"
5 
6 #include <functional>
7 #include <string>
8 
9 namespace CesiumAsync {
10 
11 class IAssetResponse;
12 
17 class CESIUMASYNC_API IAssetRequest {
18 public:
19  virtual ~IAssetRequest() = default;
20 
25  virtual const std::string& method() const = 0;
26 
30  virtual const std::string& url() const = 0;
31 
36  virtual const HttpHeaders& headers() const = 0;
37 
42  virtual const IAssetResponse* response() const = 0;
43 };
44 
45 } // namespace CesiumAsync
An asynchronous request for an asset, usually a file downloaded via HTTP.
Definition: IAssetRequest.h:17
virtual const std::string & method() const =0
Gets the request's method. This method may be called from any thread.
virtual const HttpHeaders & headers() const =0
Gets the request's header. This method may be called from any thread.
virtual const std::string & url() const =0
Gets the requested URL. This method may be called from any thread.
virtual const IAssetResponse * response() const =0
Gets the response, or nullptr if the request is still in progress. This method may be called from any...
A completed response for a 3D Tiles asset.
Classes that support asynchronous operations.
std::map< std::string, std::string, CaseInsensitiveCompare > HttpHeaders
Http Headers that maps case-insensitive header key with header value.
Definition: HttpHeaders.h:23