danielthepope / trntxt

:steam_locomotive::train::train: A data-friendly UK train times site
https://trntxt.uk
MIT License
36 stars 9 forks source link

Respect 'Accept' request header #13

Open AverageMarcus opened 9 years ago

AverageMarcus commented 9 years ago

It'd be nice if the 'Accept' header was read and the data was returned in the requested format.

E.g. JSON, XML or HTML (default)

danielthepope commented 9 years ago

Note to self: JSON interface might need to take an API key too, since I don't want my key being used for everyone else's apps ;)

AverageMarcus commented 9 years ago

But, it would be just as easy to write an app that parsed the (very simple) HTML.