> Curl automatically expands glob expressions in URLs into multiple specific URLs.
> For example, this command requests three different paths (al, bt, gm), each with two different parameters (num=1 and num=2), for a total of six URLs:
Note that it's not just curl that does glob expansion. So do some shells. Try:
echo http://httpbin/anything/{al,bt,gm}?num=[1-2]
Bash does "brace expansion" on `{al,bt,gm}` to create 3 separate params before they are given to curl/echo. (Although other, stricter bourne shells, like `dash`, do not perform this expansion.)
Yes, a lot. All those zillion shell scripts which run the IT these days use it whenever they need to get to the Internet (surprisingly, it is much more common than wget(1), which in fact does more or less the same).
And, of course, everybody and their dog uses libcurl, directly or through some bindings to their programming language.
16 comments
[ 0.15 ms ] story [ 59.6 ms ] threadIs that a standard test host? I'm curious about why it's named httpbin - is it a docker hostname?
Sorry for a weird offtopic question :/
Either way, it's some local network/local machine specific hostname.
Urls in the article would seem to line up with that theory though: https://httpbin.org/#/Dynamic_data/get_uuid
> For example, this command requests three different paths (al, bt, gm), each with two different parameters (num=1 and num=2), for a total of six URLs:
Note that it's not just curl that does glob expansion. So do some shells. Try: Bash does "brace expansion" on `{al,bt,gm}` to create 3 separate params before they are given to curl/echo. (Although other, stricter bourne shells, like `dash`, do not perform this expansion.)And, of course, everybody and their dog uses libcurl, directly or through some bindings to their programming language.
Wget implements these protocols:
A full-featured curl (and specifically not the one distributed by Microsoft) implements additional protocols: Some of the particular protocols are limited - SMB, for example, is only SMBv1 (and not v2 or v3).Microsoft's version is currently:
Whilst not _production_ as such it's an integral tool for building
Here's Daniel beating his own drum: https://archive.fosdem.org/2017/schedule/event/curl/
https://daniel.haxx.se/blog/2022/11/25/89-operating-systems/