コード例 #1
0
        private async Task <AmoResult> CreateEntity(string url, IDto entityDto)
        {
            await Authorize();

            var result = await PostAsync(url, entityDto.ToDto().ToAddDto().ToJson());

            var content = await result.Content.ReadAsStringAsync();

            return(new AmoResult {
                EntityId = GetIdFromAddResult(content),
                ResponseJson = GetFormattedJsonString(content),
                ResponseCode = (int)result.StatusCode
            });
        }