I was experimenting to see if this was possible, but it's a very bad idea. Archiving.
include_str!
from a request
This is basically just a shortcut to skip downloading a response, and using include_str!
on that downloaded file.
use request_include::include_str as request_str;
// Without user agent
const DATA: &str = request_str!("API-url");
// With user agent (recommended)
const OTHER_DATA: &str = request_str!("API-url", "my user agent");
Use at your own risk. By requesting a value at compile-time, it is very possible that, with no changes to the code, the value assigned may change between compilations.