public async Task <bool> UpdateDetectionRuleOpaqueWebRequestAsync(string id, OpaqueAndExternalWebRequestRule body = null, CancellationToken cancellationToken = default) { var response = await GetDetectionRulesOpaqueWebRequestUrl() .AppendPathSegment(id) .PutJsonAsync(body, cancellationToken) .ConfigureAwait(false); return(response.IsSuccessStatusCode); }
public async Task <EntityShortRepresentation> CreateDetectionRuleOpaqueWebRequestAsync(Positions?position = null, OpaqueAndExternalWebRequestRule body = null, CancellationToken cancellationToken = default) { var response = await GetDetectionRulesOpaqueWebRequestUrl() .SetQueryParam(nameof(position), s_positionsConverter.ConvertToString(position)) .PostJsonAsync(body, cancellationToken) .ReceiveJsonWithErrorChecking <EntityShortRepresentation>() .ConfigureAwait(false); return(response); }