question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use ReportProgress?

See original GitHub issue

Hi,

I enabled Call TransformOptions in nswagstudio image

Here is my method:

protected transformOptions(options: any) {
   return Promise.resolve({
     reportProgress: true,
   });
 }

When I do a request, now I have:

list.component.ts:111 filter failed Error: An unexpected server error occurred. at new SwaggerException (api.services.ts:2148) at throwException (api.services.ts:2168) at MergeMapSubscriber.project (api.services.ts:870) at MergeMapSubscriber.push…/node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext (mergeMap.js:61) at MergeMapSubscriber.push…/node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next (mergeMap.js:51) at MergeMapSubscriber.push…/node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:55) at Observable._subscribe (api.services.ts:2174) at Observable.push…/node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe (Observable.js:42) at Observable.push…/node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe (Observable.js:28) at MergeMapOperator.push…/node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapOperator.call (mergeMap.js:29)

I would like to be able to subscribe to the upload progression of my request like this: https://stackoverflow.com/questions/42231123/how-to-use-angular2-http-api-for-tracking-upload-download-progress/45222419#45222419

Packages.json: “@angular/animations”: “^6.1.7”, “@angular/cdk”: “^6.4.7”, “@angular/common”: “^6.1.7”, “@angular/compiler”: “^6.1.7”, “@angular/core”: “^6.1.7”, “@angular/forms”: “^6.1.7”, “@angular/http”: “^6.1.7”, “@angular/material”: “^6.4.7”, “@angular/platform-browser”: “^6.1.7”, “@angular/platform-browser-dynamic”: “^6.1.7”, “@angular/router”: “^6.1.7”, “@aspnet/signalr”: “1.0.3”, “@auth0/angular-jwt”: “^2.0.0”, “@covalent/core”: “2.0.0-beta.1”, “angular2-notifications”: “^1.0.4”, “core-js”: “^2.5.7”, “hammerjs”: “^2.0.8”, “lodash”: “^4.17.11”, “rxjs”: “^6.3.2”, “rxjs-compat”: “^6.3.2”, “zone.js”: “^0.8.26”

I use HttpClientModule

How can I configure it to make it work?

Thanks Cedric

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
AE1NScommented, Apr 23, 2019

Does someone knows if it is possible to use a custom pipe instead of calling a service? In our case I have to track the progress of different upload requests, therefore I can’t call the same service every time. Here is a similiar question https://github.com/RicoSuter/NSwag/issues/1862.

1reaction
AbuDawoodcommented, May 15, 2020

How about using the ‘transformOptions’ for certain methods and classes only Thanks in advance

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use reportProgress in HttpClient in Angular?
You need to use reportProgress: true to show some progress of any HTTP request. If you want to see all events, including the...
Read more >
BackgroundWorker.ReportProgress Method
If you need the background operation to report on its progress, you can call the ReportProgress method to raise the ProgressChanged event. The ......
Read more >
How to use reportProgress in HttpClient in Angular?
You need to use reportProgress: true to show some progress of any HTTP request. If you want to see all events, including the...
Read more >
[Solved]-How to use reportProgress in HttpClient in Angular?
you need to use reportprogress: true to show some progress of any http request. if you want to see all events, including the...
Read more >
A Taste of The New Angular HTTP Client
If we want to get notified about the download/upload progress we need to pass { reportProgress: true } to the HttpRequest object.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found