Re: Outputting URL components
Daniel Stenberg via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 29 Mar 2023, Rich Gray via curl-users wrote:
> If it's not already possible, it seems like it would be useful to give curl
> a URL solely for the purpose of write outs (no transfer operation). Curl
> would be able to function as a URL parser for scripts.
>
> curl --noop http://www.example.com:123/test -w'%{url.port}\n'
>
> would echo out 123 on a line by itself.
>
> --noop could also be useful for testing a curl command line for validity
> without doing a transfer. (Could this speed up some tests?)
Yeah, that exact thought crossed my mind as well. I'm hesitating though,
because I'm a little afraid of where such an option might take us.
--
/ 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