JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::URL::DownloadTaskOptions Class Reference

Holds options that can be specified when starting a new download with downloadToFile(). More...

#include <juce_URL.h>

Collaboration diagram for juce::URL::DownloadTaskOptions:

Public Member Functions

JUCE_NODISCARD auto withExtraHeaders (String value) const
 Specifies headers to add to the request. More...
 
JUCE_NODISCARD auto withListener (DownloadTaskListener *value) const
 Specifies an observer for the download task. More...
 
JUCE_NODISCARD auto withSharedContainer (String value) const
 On iOS, specifies the container where the downloaded file will be stored. More...
 
JUCE_NODISCARD auto withUsePost (bool value) const
 Specifies whether a post command should be used. More...
 

Public Attributes

String extraHeaders
 
DownloadTaskListenerlistener = nullptr
 
String sharedContainer
 
bool usePost = false
 

Private Member Functions

template<typename Member , typename Value >
JUCE_NODISCARD DownloadTaskOptions with (Member &&member, Value &&value) const
 

Detailed Description

Holds options that can be specified when starting a new download with downloadToFile().

Member Function Documentation

◆ with()

template<typename Member , typename Value >
JUCE_NODISCARD DownloadTaskOptions juce::URL::DownloadTaskOptions::with ( Member &&  member,
Value &&  value 
) const
inlineprivate

◆ withExtraHeaders()

JUCE_NODISCARD auto juce::URL::DownloadTaskOptions::withExtraHeaders ( String  value) const
inline

Specifies headers to add to the request.

References juce::gl::value.

◆ withListener()

JUCE_NODISCARD auto juce::URL::DownloadTaskOptions::withListener ( DownloadTaskListener value) const
inline

Specifies an observer for the download task.

References juce::gl::value.

◆ withSharedContainer()

JUCE_NODISCARD auto juce::URL::DownloadTaskOptions::withSharedContainer ( String  value) const
inline

On iOS, specifies the container where the downloaded file will be stored.

If you initiate a download task from inside an app extension on iOS, you must supply this option.

This is currently unused on other platforms.

References juce::gl::value.

◆ withUsePost()

JUCE_NODISCARD auto juce::URL::DownloadTaskOptions::withUsePost ( bool  value) const
inline

Specifies whether a post command should be used.

References juce::gl::value.

Member Data Documentation

◆ extraHeaders

String juce::URL::DownloadTaskOptions::extraHeaders

◆ listener

DownloadTaskListener* juce::URL::DownloadTaskOptions::listener = nullptr

◆ sharedContainer

String juce::URL::DownloadTaskOptions::sharedContainer

◆ usePost

bool juce::URL::DownloadTaskOptions::usePost = false

The documentation for this class was generated from the following file: