News for hackers. Stuff that matters.
Re:Show HN: Curl https://ec2.shop by cheeaun on Tuesday June 30, 2020 @08:09AM (#23689232)
Is this open sourced?

I personally try looking into implementing a curl "interface" to one of my projects, realised that it actually need to check the user-agent (of curl and a plethora of curl alternatives) which I find kind of weird...

Re:Show HN: Curl https://ec2.shop by codetrotter on Tuesday June 30, 2020 @08:27AM (#23689347)
> realised that it actually need to check the user-agent

Like someone suggested for the featured page as well, I recommend you make use of the accept header.

For example, assuming your interface is outputting freeform text (since the goal was to have something readable in terminal), you could use something like this:

    Accept: text/vnd.myproject.tui+plain; version=1.0
(Substitute “myproject” with the actual name of your project.)
Re:Show HN: Curl https://ec2.shop by kureikain on Tuesday June 30, 2020 @10:54AM (#23690658)
Hey, yes it's 100% open source.

https://github.com/yeo/ec2.shop

The reason it check `curl` agent is because it share the same endpoint (root url) for both of `curl` page and browser version(the one with dropdown, grid etc)

Re:Show HN: Curl https://ec2.shop by cheeaun on Tuesday June 30, 2020 @11:10AM (#23690840)
I see, thanks!