vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function parseUserURL

Parses a user-provided URL with relaxed rules.

URL parseUserURL (
  string url,
  string default_schema
);

Unlike URL.parse, this allows the URL to use special characters as part of the host name and path, automatically employing puny code or percent-encoding to convert this to a valid URL.

Parameters

NameDescription
url String representation of the URL
default_schema If url does not contain a schema name, the URL parser may choose to use this schema instead. A browser might use "http" or "https", for example.
Authors

Sönke Ludwig

Copyright

© 2012-2017 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.