Beispiel #1
0
        public async Task <bool> UpdatePluginEndpointAsync(string id, string endpointId, RemotePluginEndpoint body, CancellationToken cancellationToken = default)
        {
            var response = await GetPluginsUrl()
                           .AppendPathSegment(id)
                           .AppendPathSegment("endpoints")
                           .AppendPathSegment(endpointId)
                           .PutJsonAsync(body, cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
Beispiel #2
0
        public async Task <EntityShortRepresentation> CreatePluginEndpointAsync(string id, RemotePluginEndpoint body, CancellationToken cancellationToken = default)
        {
            var result = await GetPluginsUrl()
                         .AppendPathSegment(id)
                         .AppendPathSegment("endpoints")
                         .PostJsonAsync(body, cancellationToken)
                         .ReceiveJsonWithErrorChecking <EntityShortRepresentation>()
                         .ConfigureAwait(false);

            return(result);
        }