Detect format based on HTTP Accept header, closes #8