diff --git a/src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid b/src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid index 6f5eaa3e15..98d4efbd6a 100644 --- a/src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid +++ b/src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid @@ -283,7 +283,7 @@ {% endif -%} {% if GeneratePrepareRequestAndProcessResponseAsAsyncMethods %} - await PrepareRequestAsync(client_, request_, urlBuilder_).ConfigureAwait(false); + await PrepareRequestAsync(client_, request_, urlBuilder_, cancellationToken).ConfigureAwait(false); {% else -%} PrepareRequest(client_, request_, urlBuilder_); {% endif -%} @@ -292,7 +292,7 @@ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); {% if GeneratePrepareRequestAndProcessResponseAsAsyncMethods -%} - await PrepareRequestAsync(client_, request_, url_).ConfigureAwait(false); + await PrepareRequestAsync(client_, request_, url_, cancellationToken).ConfigureAwait(false); {% else -%} PrepareRequest(client_, request_, url_); {% endif -%}