public async Task <GetResourceResult> UpdateResourceAsync(UpdateParams parameters) { var url = Api.ApiUrlV.ResourceType("resources").Add(Api.GetCloudinaryParam(parameters.ResourceType)).Add(parameters.Type).Add(parameters.PublicId).BuildUrl(); using (var response = await Api.CallAsync(HttpMethod.Post, url, parameters.ToParamsDictionary(), null, null)) { return(await GetResourceResult.Parse(response)); } }
public GetResourceResult UpdateResource(UpdateParams parameters) { UrlBuilder urlBuilder = new UrlBuilder( m_api.ApiUrlV. ResourceType("resources"). Add(Api.GetCloudinaryParam <ResourceType>(parameters.ResourceType)). Add(parameters.Type).Add(parameters.PublicId). BuildUrl(), parameters.ToParamsDictionary()); using (HttpWebResponse response = m_api.Call( HttpMethod.POST, urlBuilder.ToString(), null, null)) { return(GetResourceResult.Parse(response)); } }