restapi : Facilitate accept-type specification by file extension

Facilitate accept-type specification by file extension

Change-Id: I86c63405e6d8b28c483079782d5f52b75410a5ae
Signed-off-by: Anmol Babu <anbabu@redhat.com>