Skip to main content

normalize_romm_origin

Function normalize_romm_origin 

Source
pub fn normalize_romm_origin(url: &str) -> String
Expand description

RomM site URL: the same origin you use in the browser (scheme, host, optional port).

Trims whitespace and trailing /, and removes a trailing /api segment if present. HTTP calls use paths such as /api/platforms; they must not double up with .../api/api/....