Discussion about multipart post with Async::HTTP::Client/Falcon #193
renatolond
started this conversation in
General
Replies: 1 comment
-
Yes, that makes sense, I should probably work on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
I was checking #160 about multipart post, but I have a slightly different case and I feel like what I'm doing is a bit odd.
I have a rails app (running Falcon) with a form to post an image. The rails app then takes that image (that comes in an ActionDispatch::Http::UploadedFile) and will forward it to a backend using a Async::HTTP::Client.
The code in the controller looks something like this:
And in the client object:
I used part of the discussion in #160 to make this and it works (full code over at retromeet/web-client@0f4d33f). Besides the oddness of this "manual redirection" of sorts, it feels odd to load part of Net::HTTP for this to work.
From your explanation, I believe a
Protocol::HTTP::Multipart
class at the very leat would have to derive fromReadable
and re-implement the logic ofMultipart::Post::Multipartable
, does it make sense?Beta Was this translation helpful? Give feedback.
All reactions