(moved to correct Forum)
now that I’ve changed the code to use PostAsync, the only notable difference I can see in the example you provided is that its using GetAsync where I am using PostAsync…could that have something to do with it? Surely not?
I’ve added a POST example which works the same as GET:
FYI, I’ve expanded the tests to include different scenarios:
In all cases the callback fires, but in a few of them the ContentLength was unknown and so the total was coming back as -1. I’ve expanded ServiceStack to set the ContentLength where possible in this commit:
With this commit all the SelfHosting async progress tests pass. The ASP.NET development server doesn’t let you set the ContentLength so a few of progress tests will fail with an unknown length, marked with Explicit here:
This change is now on MyGet:
One thing that you might need to be aware of is that the BufferSize determines the granularity of the callbacks as it executes the callback once the buffer gets full. By default the BufferSize is 8192 byes.