Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using interceptors on multipart request #123

Open
abdulkash opened this issue Apr 11, 2023 · 10 comments
Open

Using interceptors on multipart request #123

abdulkash opened this issue Apr 11, 2023 · 10 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@abdulkash
Copy link

abdulkash commented Apr 11, 2023

When i use a logging interceptor on a multipart request it returns StreamedResponse and if i listen to this object i get "Bad state exception stream has already been listened to"

@abdulkash abdulkash added the bug Something isn't working label Apr 11, 2023
@mittal-sahab-sudo
Copy link

Any fix for this ? I am getting the same issue.

@CodingAleCR
Copy link
Owner

Hi, I'm looking into it, however I do this on my spare time, which is definitely not enough. Pull requests are always welcomed though. 😄

@CodingAleCR
Copy link
Owner

At the moment, the way that you can work with Multipart Requests would be to do something like in the example project. In there, you'll find a way to do requests without necessarily needing to listen to the stream.

I'm still looking for a way to "clone" the stream and data into a new one without having the stream either closed or listened to but it might take me a while to figure out a scalable solution.

@CodingAleCR CodingAleCR added the help wanted Extra attention is needed label Jul 8, 2023
@abdulkash
Copy link
Author

Its the same implementation on the example code that I used but it still has the same issue

@CodingAleCR
Copy link
Owner

CodingAleCR commented Jul 8, 2023

What I meant with the example is that you might not need to listen to the stream, or is there any specific reason that you want need to do that?

@abdulkash
Copy link
Author

abdulkash commented Jul 9, 2023

When I don't listen to the stream the logged response is StreamedResponse object

@CodingAleCR
Copy link
Owner

Yes, you could work with the StreamedResponse like in the Multipart Request example. You would parse the StreamedResponse to a Response and do what you need with it.

@CodingAleCR
Copy link
Owner

At least if you don't depend on listen. If you do then I would ask for a bit more patience since I can't look at it at the moment. Sorry it takes too long to get things done!

@stale
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 17, 2023
@eldarkk
Copy link

eldarkk commented Jun 18, 2024

Any progress with fixing issue ?

@stale stale bot removed the wontfix This will not be worked on label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants