URL parsen

Eine HTTP- oder HTTPS-URL in Host, Pfad und Query teilen.

Parst eine http- oder https-URL in Protokoll, Host, Port, Pfad, Query und Hash. Anders als URLs extrahieren: scannt keinen Absatz. Anders als URL Encode: kein Percent-Encoding. Anders als Query zu JSON: Query bleibt roh. Andere Schemes scheitern.

Protocol: https

Host: example.com

Port: 8080

Path: /path

Query: q=1

Hash: top

Origin: https://example.com:8080

Username: (none)

Password: (none)

Abfrageparameter (JSON): {"q":"1"}