Raise exception on 4xx and 5xx status code
Make dict keys readable
Use media_type to determine file extension