ASP.NET Web API return data in JSON or XML by checking Request content type
===

While using ASP.NET Web API, how can I check request content type whether it is application/xml or application/json?  I know about content negotiation in ASP.NET Web API but it's not going to work with me because I get the data from database in XML format only.  So if I can check request content type, I can convert XML to json when request content type is XML otherwise simply return XML.  

thanks in advance.  
