jsakamoto / Toolbelt.Blazor.HttpClientInterceptor

Intercept all of the sending HTTP requests on a client side Blazor application.
Mozilla Public License 2.0
71 stars 11 forks source link

Do we have any way to read content of response if status is 200 . I have to read 2 times. Is this possible? #11

Open snehabihani opened 2 years ago

snehabihani commented 2 years ago
var captured = await e.GetCapturedContentAsync();

this statement in interceptor and reading response in _structureClient.SetAsync(setStructureCommand) like this in page also.. so it is throwing error for already read stream.

jsakamoto commented 2 years ago

@snehabihani

I'm very sorry, but I couldn't understand what you wanted to tell me. 🙇

Anyway, that question may not be particular about the "HttpClientIntercepter" NuGet package, isn't it?

Your question has looked like a general topic of .NET programming for me.

If so, any other Q&A forums such as "Stack Overflow (https://stackoverflow.com/)" must be more helpful than this thread.

If not, could you explain more details by attaching all of the files of a minimal project that can reproduce the problem you want to solve? (You can attach any files to this issue thread by drag & drop operation.)

We might be able to conversation via source code! 👍

Bamsunbic commented 1 year ago

I'm using a NET 6. I get the same error...

jsakamoto commented 1 year ago

@Bamsunbic Sorry too late since I was busy watching the .NET Conf 2022 that was held this week. (I live in Japan, so I had to wake up at midnight in the Japan Standard Time zone and keep staying up).

By the way, if you want to get help, please provide more detail and specific information. Otherwise, I can't help you.

It will be a much better way to resolve the problem If you disclose the source code of your application that you are encountering the error.

I appreciate it if you understand that the highest barrier to resolving issues like this is reproducing the problem on my side.