Ejemplo n.º 1
0
        public async Task <RemoteEnvironmentConfigStub> CreateRemoteEnvironmentAsync(RemoteEnvironmentConfigDto body, CancellationToken cancellationToken = default)
        {
            var result = await GetRemoteEnvironmentsUrl()
                         .PostJsonAsync(body, cancellationToken)
                         .ReceiveJsonWithErrorChecking <RemoteEnvironmentConfigStub>()
                         .ConfigureAwait(false);

            return(result);
        }
Ejemplo n.º 2
0
        public async Task <RemoteEnvironmentConfigStub> UpdateRemoteEnvironmentAsync(string id, RemoteEnvironmentConfigDto body, CancellationToken cancellationToken = default)
        {
            var result = await GetRemoteEnvironmentsUrl()
                         .AppendPathSegment(id)
                         .PutJsonAsync(body, cancellationToken)
                         .ReceiveJsonWithErrorChecking <RemoteEnvironmentConfigStub>()
                         .ConfigureAwait(false);

            return(result);
        }