application/x-www-form-urlencoded #711
Answered
by
tarcieri
ldecourcel
asked this question in
Q&A
-
Hello, I am supposed to make a post request sending a file but I cannot any ways to properly encode it and send it. If anyone has an idea on how to proceed, it would be greatly appreciated if you share it. Thanks ! |
Beta Was this translation helpful? Give feedback.
Answered by
tarcieri
Apr 5, 2022
Replies: 2 comments
Answer selected by
ixti
-
HTTP.post("http://example.com/resource", :form => {
:username => "ixti",
:avatar => HTTP::FormData::File.new("/home/ixti/avatar.png")
}) See Also: https://github.com/httprb/http/wiki/Passing-Parameters |
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
Please see https://github.com/httprb/form_data