class methods
Documentation from code comments
loads a file from a URL using an HTTP request
clear()
void ofBaseURLFileLoader::clear()
Documentation from code comments
clear all active HTTP requests from the queue
get(...)
ofHttpResponse ofBaseURLFileLoader::get(const string &url)
Documentation from code comments
make an HTTP request blocks until a response is returned or the request times out
Parameters:
url HTTP url to request, ie. "http://somewebsite.com/someapi/someimage.jpg" \return HTTP response on success or failure
getAsync(...)
int ofBaseURLFileLoader::getAsync(const string &url, const string &name)
Documentation from code comments
make an asynchronous HTTP request will not block, placed in a queue and run using a background thread
Parameters:
url HTTP url to request, ie. "http://somewebsite.com/someapi/someimage.jpg"
name optional key to use when sorting requests \return unique id for the active HTTP request
handleRequest(...)
ofHttpResponse ofBaseURLFileLoader::handleRequest(const ofHttpRequest &request)
Documentation from code comments
low level HTTP request implementation blocks until a response is returned or the request times out \return HTTP response on success or failure
remove(...)
void ofBaseURLFileLoader::remove(int id)
Documentation from code comments
remove an active HTTP request from the queue
Parameters:
unique HTTP request id
saveAsync(...)
int ofBaseURLFileLoader::saveAsync(const string &url, const filesystem::path &path)
Documentation from code comments
make an asynchronous HTTP request and save the response data to a file will not block, placed in a queue and run using a background thread
Parameters:
url HTTP url to request, ie. "http://somewebsite.com/someapi/someimage.jpg"
path file path to save to
Returns: unique id for the active HTTP request
saveTo(...)
ofHttpResponse ofBaseURLFileLoader::saveTo(const string &url, const filesystem::path &path)
Documentation from code comments
make an HTTP request and save the response data to a file blocks until a response is returned or the request times out
Parameters:
url HTTP url to request, ie. "http://somewebsite.com/someapi/someimage.jpg"
path file path to save to \return HTTP response on success or failure
stop()
void ofBaseURLFileLoader::stop()
Documentation from code comments
stop & remove all active and waiting HTTP requests
Last updated 星期二, 19 十一月 2024 17:24:52 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue