Hacker News new | ask | show | jobs
by lurtbancaster 1024 days ago
Couple more things wget can do that curl can't.

1. wget can resolve onion links. curl can't(yet). You'll get a

    curl: (6) Not resolving .onion address (RFC 7686)

2. curl has problems parsing unicode characters

    curl -s -A "Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0" https://old.reddit.com/r/GonewildAudible/comments/wznkop/f4m_mi_coño_esta_mojada_summer22tomboy/.json
will give you a

    {"message": "Bad Request", "error": 400}
 
wget on the other hand, automatically converts the ñ to UTF-8 hex - %C3%B1 - and resolves the link perfectly.

I've searched the curl manpage and couldn't find a way to solve this. Please help.

I'm having to use `xh --curl` [1] to "fix" the links before I pass them to curl.

[1] https://github.com/ducaale/xh