[−][src]Function screeps_api::websocket::transform_url
pub fn transform_url<U: AsRef<str> + ?Sized>(url: &U) -> Result<Url, UrlError>
Method for finding a websocket URL given the screeps API URL.
This method uses the thread-local rand
crate rng to come up with a unique
session id, and the resulting url should not be reused over multiple connections.
The input URL should be an API url in the format of https://screeps.com/api/
.