#include <UrlRequest.h>
|
static std::shared_ptr< UrlRequest > | create (std::string url, std::string filename, bool unpack=false, std::string certPath="") |
|
|
static constexpr auto | UNPACK = true |
|
◆ create()
static std::shared_ptr<UrlRequest> alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::create |
( |
std::string |
url, |
|
|
std::string |
filename, |
|
|
bool |
unpack = false , |
|
|
std::string |
certPath = "" |
|
) |
| |
|
static |
Creates an Artifact Request that will contain all the necessary info to download a file using a url.
- Parameters
-
url | REQUIRED, url used to download the desired artifact. |
filename | REQUIRED, name of the resource to be stored on the device. |
unpack | OPTIONAL, if true, then artifact will be unpacked and the directory will be provided. |
certPath | OPTIONAL, if not-emtpy, then the download request will be made with the SSL cert at the cerPath. |
- Returns
- NULLABLE, a smart pointer to a request if all params are valid.
◆ getCertPath()
const std::string & alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getCertPath |
( |
| ) |
const |
|
inline |
- Returns
- the optional filepath to the SSL Certificate which can be used for this request.
◆ getFilename()
const std::string & alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getFilename |
( |
| ) |
const |
|
inline |
- Returns
- the filename to be used for this artifact in case we cannot fetch the name from HTTP headers.
◆ getRequestType()
Type alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getRequestType |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getSummary()
std::string alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getSummary |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getUrl()
const std::string & alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::getUrl |
( |
| ) |
const |
|
inline |
- Returns
- the URL used to download the requested file.
◆ needsUnpacking()
bool alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::needsUnpacking |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ toJsonString()
std::string alexaClientSDK::acsdkAssets::commonInterfaces::UrlRequest::toJsonString |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/capabilities/DavsClient/acsdkAssetsInterfaces/include/acsdkAssetsInterfaces/UrlRequest.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0