/// <summary> /// Changes the properties of a collection /// PUT /_api/collection/{collection-name}/properties /// </summary> /// <param name="collectionName"></param> /// <param name="body"></param> /// <returns></returns> public virtual async Task <PutCollectionPropertyResponse> PutCollectionPropertyAsync( string collectionName, PutCollectionPropertyBody body) { var content = GetContent(body, new ApiClientSerializationOptions(true, true)); using (var response = await _transport.PutAsync(_collectionApiPath + "/" + collectionName + "/properties", content)) { if (response.IsSuccessStatusCode) { var stream = await response.Content.ReadAsStreamAsync(); return(DeserializeJsonFromStream <PutCollectionPropertyResponse>(stream)); } throw await GetApiErrorException(response); } }
/// <summary> /// Changes the properties of a collection /// PUT /_api/collection/{collection-name}/properties /// </summary> /// <param name="collectionName"></param> /// <param name="body"></param> /// <param name="cancellationToken"></param> /// <returns></returns> public virtual async Task <PutCollectionPropertyResponse> PutCollectionPropertyAsync(string collectionName, PutCollectionPropertyBody body, CancellationToken cancellationToken = default) { return(await PutRequestAsync($"{ApiRootPath}/{collectionName}/properties", response => new PutCollectionPropertyResponse(response), body, null, cancellationToken)); }