我有以下两个应用
我正在使用Angular的HttpClient向API 发出GET请求,如下所示
this.subscription = this.httpClient.get('api/Controller/LongRunningProcess')
.subscribe((response) =>
{
// Handling response
});
Run Code Online (Sandbox Code Playgroud)
API控制器的LongRunningProcess方法具有以下代码
[HttpGet]
[Route("LongRunningProcess")]
public async Task<IActionResult> LongRunningProcess(CancellationToken cancellationToken)
{
try
{
// Dummy long operation
await Task.Factory.StartNew(() =>
{
for (int i = 0; i < 10; i++)
{
// Option 1 (Not working)
if (cancellationToken.IsCancellationRequested)
break;
// Option 2 (Not working)
cancellationToken.ThrowIfCancellationRequested();
Thread.Sleep(6000);
}
}, cancellationToken);
}
catch (OperationCanceledException e)
{
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with …Run Code Online (Sandbox Code Playgroud) c# asp.net-core asp.net-core-webapi asp.net-core-2.0 angular
我知道SuiteScript是基于JavaScript构建的NetSuite平台,可以实现业务流程的完全自定义和自动化。
我想知道SuiteScript是否有需求?如果我获得以下认证,未来会怎样