Intechnity-com / OdooJsonRpcClient

Odoo Client Json Rpc
MIT License
67 stars 29 forks source link

Cancellation Token missing #41

Closed Leeemons closed 1 year ago

Leeemons commented 2 years ago

Hello, why async methods do not have cancellation token? Example:

        public static async Task<OdooResult<T>> CallAndDeserializeAsync<T>(OdooRequestModel request, CancellationToken cancellationToken)
        {
            _ = 1;
            try
            {
                return JsonConvert.DeserializeObject<OdooResult<T>>(await (await CallAsync(request)).Content.ReadAsStringAsync(cancellationToken));
            }
            catch (Exception ex)
            {
                return OdooResult<T>.FailedResult(ex.ToString());
            }
        }
patricoos commented 1 year ago

Thanks for the suggestions. Just create a new release with CancellationToken. Please check new version 1.0.19