Skip to content

ofUrlFileLoader progress function#8507

Merged
danoli3 merged 1 commit intoopenframeworks:masterfrom
NickHardeman:feature-url-progress
Apr 4, 2026
Merged

ofUrlFileLoader progress function#8507
danoli3 merged 1 commit intoopenframeworks:masterfrom
NickHardeman:feature-url-progress

Conversation

@NickHardeman
Copy link
Copy Markdown
Contributor

It's rather hidden, but super handy.

ofURLFileLoader floader;
ofHttpRequest req;
req.progressCallback = [](const ofHttpRequest & req, float progress) {
	ofLogNotice("ofApp") << "http progress: " << progress;
};
req.url = "https://openframeworks.cc/about/0.jpg";
req.method = ofHttpRequest::GET;
req.timeoutSeconds = 60;
ofHttpResponse res = floader.handleRequest(req);
if (res.status != 200) {
	ofLogError("ofApp") << "Image download failed";
}

@danoli3
Copy link
Copy Markdown
Member

danoli3 commented Apr 4, 2026

Nice looks good and useful!

@danoli3 danoli3 merged commit cc5b398 into openframeworks:master Apr 4, 2026
17 checks passed
@danoli3 danoli3 added the utility label Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants