Parse a URL into components
Will take an URL as an input, and break it into the following components:
- protocol
- host
- port
- username
- password
- path
- query_string
Parse URL string
$ functions/parse-url.sh https://my.vault.internal
{ "proto": "https", "host": "my.vault.internal", "port": 443, "username": "", "password": "", "path": "", "query_string": "" }
- $1 (string): URL
- JSON structure keyed on URL components