pinnwand
pinnwand copied to clipboard
Automatically deliver raw when user-agent matches curl/.*
I believe It would be very practical if, when queried from tools like curl, httpie et al. do automatically deliver the /raw/
output instead of the html frontend.
Mrm, I tend to agree but it might also be confusing. I'll give it a good thought.
Sounds like a good idea to me. Maybe just serve raw output if the user agent doesn't contain Mozilla/5.0
, or see if the Accept
header doesn't explicitly contain text/html
(or even prescribes something else, though curl's default is just */*
).