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); }
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); }