edgurgel / httparrot

HTTP Request & Response Server. An incomplete clone of http://httpbin.org
https://httparrot.onrender.com/
MIT License
86 stars 27 forks source link

add support for multipart/form-data POST,PUT,PATCH similar to httpbin's #9

Closed jordan0day closed 9 years ago

jordan0day commented 9 years ago

i think the output matches httpbin's behavior pretty closely for multipart/form-data requests. supports both regular form-data and file uploads.

edgurgel commented 9 years ago

That's a great contribution! Thank you very much @jordan0day!

The build is failing for other reasons, I will just drop support to older Elixir versions.

edgurgel commented 9 years ago

Also thanks for the extensive unit tests! :+1:

jordan0day commented 9 years ago

Updated to use comprehensions in a couple of places -- both where you suggested in the parse_content_disposition_header fn and in the main post_multipart header, removing the filter and reducer anonymous fn's.

Also, thanks for making such a useful project! It really makes testing http client stuff a lot quicker!

edgurgel commented 9 years ago

Thanks for the update. I just commented a small thing. Again, thank you for the contribution :+1:

jordan0day commented 9 years ago

Ah yes, of course, good catch. Fixed.