1

I have a rest service implementation as follows:

 public string GetMenuItemById(string itemID)
 {
   MenuItemsRepository menutemsRepository = new MenuItemsRepository();
   string json = menutemsRepository.GetMenuItemById(itemID);
   .....
 }

I want to return JSON string, but the content-type in the response should not be application/json but text/json or html/json. How can I achieve this?

4

0 に答える 0