by kureikain · 6y ago · 0 comments
So I develop this small tool which you can do thing like
curl https://ec2.shop
curl https://ec2.shop?region=us-west-2&filter=t2,m4I just implement it: https://github.com/yeo/ec2.shop/commit/ab258aef3ac2ad3d45b26...
Now by default it's text mode, so request by http client library or tool like curl, wget, httppie all get text bersion.
Only when detecting `Accept` contains `html` and user agent is safari/chrome/firefox etc it send html version.
Do you not need to escape the ampersand in the second example? otherwise bash will run it in the background and skip the `filters=t2,m4` part.