Outputting URL components
Daniel Stenberg via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
Hello friends. I'm working on this little PR that I figure could use some more visibility and brain storming: https://github.com/curl/curl/pull/10853 It adds ten new variables to the -w/--write-out option to allow different parts of the used URL to get output separately. Basically helping to split up the URL. Something that is very tricky to do in for example an ordinary shell script. The new variables are currently called "url-[part]" and this is the complete list: url-scheme, url-user, url-password, url-options, url-host, url-port, url-path, url-query, url-fragment, url-zoneid - Should we rather use a dot (.) instead of minus (-) like "url.scheme" instead? - Is this generally a feature you would like? - This feature is so far made for the *input* URL that curl operates on. There's also something we call the "effective URL" which is the last URL curl operated on, like when following a series of redirects. Should we offer the same set of variables for that? -- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://curl.se/support.html -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.html