cesium-native  0.41.0
IAssetResponse.h
1 #pragma once
2 
3 #include "HttpHeaders.h"
4 #include "Library.h"
5 
6 #include <gsl/span>
7 
8 #include <cstddef>
9 #include <cstdint>
10 #include <map>
11 #include <string>
12 
13 namespace CesiumAsync {
14 
18 class CESIUMASYNC_API IAssetResponse {
19 public:
23  virtual ~IAssetResponse() = default;
24 
28  virtual uint16_t statusCode() const = 0;
29 
33  virtual std::string contentType() const = 0;
34 
38  virtual const HttpHeaders& headers() const = 0;
39 
43  virtual gsl::span<const std::byte> data() const = 0;
44 };
45 
46 } // namespace CesiumAsync
A completed response for a 3D Tiles asset.
virtual const HttpHeaders & headers() const =0
Returns the HTTP headers of the response.
virtual ~IAssetResponse()=default
Default destructor.
virtual gsl::span< const std::byte > data() const =0
Returns the data of this response.
virtual std::string contentType() const =0
Returns the HTTP content type.
virtual uint16_t statusCode() const =0
Returns the HTTP response code.
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