Remote-Url: https://curl.se/mail/archive-2022-01/0055.html Retrieved-at: 2022-01-21 15:30:08.245655+00:00 Download Browse source Changelog tiny-curl Documentation Project Bug Bounty FAQ Help us Known bugs TODO Protocols CA bundle HTTP Cookies HTTP/2 SSL Certs Releases Security Version numbers Vulnerabilities curl tool man page Tutorial HTTP scripting Videos Who and Why libcurl ABI API Competitors Examples Features Mailing list Related libs Using libcurl Tutorial Testimonials Get Help curl-library curl-users IRC / chat Mailing lists Everything curl [book] Video presentations Report a bug Paid support Development Autobuilds Code review Code style Contribute Dashboard Deprecate Internals Release Notes Release Procedure Roadmap Run Tests Security Process Specifications Test curl News Changelog Release table curl / Mailing Lists / curl-users / Single Mail Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself. [PROPOSAL] URL shortcuts * This message: [ Message body ] [ More options (top, bottom) ] * Related messages: [ Next message ] [ Previous message ] [ Next in thread ] [ Replies ] * Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ] From: Daniel Stenberg via curl-users Date: Fri, 21 Jan 2022 09:22:58 +0100 (CET) Hello, Let me bring up another small proposal I picked up from previous twitter reply, and see what you all think. The URL shortcut. The intent is here primarily to save keystrokes for commonly repeated URLs for users doing repeated curl command lines with variations. (Again a thing for the command line tool only.) A "URL" that starts with colon (thereby not being a URL at all so the command line parser can easily catch when this happens), implies a "http://localhost" prefix. Like this: $ curl :80/ $ curl :8080/index.html $ curl :/search.cgi?q=crazy The difference from hacks like where you use 0 as in "curl 0:80/", the 0 thing is IPv4-only and it doesn't pass on the hostname. Also, we don't really document the 0 trick anywhere, where as the colon-thing would be a supported features. Since this would introduce this idea of a shortcut that isn't really a URL when input but gets translated into one when used, it would open up the opportunity to do *other* shortcuts or URL trickeries on the command line. I can't say that I have managed to come up with any suitable additional alternatives. -- / 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/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.html Received on 2022-01-21 * This message: [ Message body ] * Next message: Ray Satiro via curl-users: "Re: [PROPOSAL] URL shortcuts" * Previous message: Timothe Litt: "Re: JSON support" * Next in thread: Ray Satiro via curl-users: "Re: [PROPOSAL] URL shortcuts" * Reply: Ray Satiro via curl-users: "Re: [PROPOSAL] URL shortcuts" * Reply: Andreas Mohr via curl-users: "Re: [PROPOSAL] URL shortcuts" * Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]