Explain how to specify download paths when using wxWebRequest
Add an overview paragraph explaining how to use wxWebRequest's and wxWebEvent's IDs together to specify a request's download path before starting it. The sample shows how to interactively prompt for local paths once a file downloads, but not how to download a file to a specific location without user prompting, so document how to do it. See #22986. Closes #23504.
This commit is contained in:
parent
35c328e221
commit
c27b711379
1 changed files with 9 additions and 0 deletions
|
|
@ -64,6 +64,15 @@
|
|||
request.Start();
|
||||
@endcode
|
||||
|
||||
The location of where files are downloaded can also be defined prior to any request
|
||||
by passing unique IDs to `wxWebSession::GetDefault().CreateRequest()` and processing
|
||||
them in your @c wxEVT_WEBREQUEST_STATE handler. For example, create a map of IDs with
|
||||
their respective download paths prior to creating any requests. For each call to
|
||||
`wxWebSession::GetDefault().CreateRequest()`, pass in the webpath to download and an ID
|
||||
from your map. Then, in your @c wxEVT_WEBREQUEST_STATE handler, get the ID from the
|
||||
@c wxWebRequestEvent object and look it up from your ID map. Here, you can access the
|
||||
download path that you assigned to this ID and proceed to save the file to that location.
|
||||
|
||||
@section apple_http macOS and iOS App Transport Security
|
||||
|
||||
Starting with macOS 10.11 and iOS 9 an application cannot create unsecure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue