3 ms·
but there's no good way for a server to tell if it's requested by a text based client, wttr.in is hard coding a list of text clients' User-Agent [0], which is n
by slmjkdbtl 6y ago
but there's no good way for a server to tell if it's requested by a text based client, wttr.in is hard coding a list of text clients' User-Agent [0], which is not so pretty imo. If look for "Accept: text/plain" in request header, curl as the most popular client won't set it.
[0] https://github.com/chubin/wttr.in/blob/4eedafb81356e62b9f1c8aed726b8890910df634/lib/globals.py#L75 https://github.com/chubin/wttr.in/blob/4eedafb81356e62b9f1c8...
- kevincox 6y agoIt's not even text/plain. We need a text/ansi (is there a better name for that?)
- warmwaffles 6y agoI think something like `application/term` would probably be better for this.