public Response<MediaCategory> postMediaCategory(MediaCategory mediaCategory) { IncomingWebRequestContext requestContext = WebOperationContext.Current.IncomingRequest; Dictionary<string, string> data = new Dictionary<string, string>(); string authString = requestContext.Headers[HttpRequestHeader.Authorization]; data.Add("description", mediaCategory.description); data.Add("name", mediaCategory.name); Request request = makeRequest(requestContext, trimData(data), authString); MediaCategoryController controller = new MediaCategoryController(); return controller.Call(request); }
public Response<MediaCategory> deleteMediaCategory(string id) { IncomingWebRequestContext requestContext = WebOperationContext.Current.IncomingRequest; Dictionary<string, string> data = new Dictionary<string, string>(); string authString = requestContext.Headers[HttpRequestHeader.Authorization]; data.Add("id", id); Request request = makeRequest(requestContext, trimData(data), authString); MediaCategoryController controller = new MediaCategoryController(); return controller.Call(request); }