-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: add http
& https
asset sources
#16366
base: main
Are you sure you want to change the base?
Conversation
It looks like |
It's possible to add an exception for the licenses, but unmaintained and vulnerable is pretty bad. |
This could be done with something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep this looks awesome to me! Also I wasn't aware of the surf
crate; I'll have to keep it in mind for any bevy dashboards I make in the future
@mnmaita actually that would be great, I've replaced // crates/bevy_asset/src/http_source.rs#134
let client = reqwest_middleware::ClientBuilder::new(Client::new())
.with(Cache(HttpCache {
mode: CacheMode::Default,
manager: CACacheManager::default(),
options: HttpCacheOptions::default(),
}))
.build();
let response = ContinuousPoll(client.get(str_path).send())
.await |
FWIW surf has a bug where any erroring http response >8kb stops every subsequent request from succeeding and is unlikely to ever be fixed which made me unable to use bevy_web_asset so I would personally appreciate a switch 😄. If you can't get reqwest to work perhaps hyper would suffice since it's already in the dep tree for BRP? Perhaps too low level for this. |
Objective
bevy_web_asset
, allowing assets loaded viahttp
#16307Solution
http
&https
asset sourcesTesting
bevy_web_asset
.meta
file yet.cargo run --example http_asset
Showcase
Bevy now supports assets loaded via url!
TODO