pinnwand icon indicating copy to clipboard operation
pinnwand copied to clipboard

Automatically deliver raw when user-agent matches curl/.*

Open mweinelt opened this issue 4 years ago • 2 comments

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.

mweinelt avatar Dec 08 '20 17:12 mweinelt

Mrm, I tend to agree but it might also be confusing. I'll give it a good thought.

supakeen avatar Dec 27 '20 13:12 supakeen

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 */*).

0xallie avatar Dec 03 '21 10:12 0xallie