jnunemaker / httparty

:tada: Makes http fun again!
MIT License
5.79k stars 968 forks source link

Suggestion: Replace `mime-types` with `mini_mime` for content type lookup #769

Closed carlosantoniodasilva closed 1 year ago

carlosantoniodasilva commented 1 year ago

mini_mime is a minimal mime type library that's more performant and less memory hungry. https://github.com/discourse/mini_mime

It has replaced mime-types in the mail gem: (which is a dependency of actionmailer, and by extension, rails) https://github.com/mikel/mail/pull/1059

As well as capybara: https://github.com/teamcapybara/capybara/pull/1884

Which also means using it as a dependency of httparty would be able to reuse the same dependency that should be already available in most Rails apps, instead of pulling in an extra mime-types dependency.

The change in code is pretty straightforward, the same one made by the capybara PR linked above.

jnunemaker commented 1 year ago

This is great! I'm sorry I didn't see it until now. Not sure what the deal is but I swear I'm not getting some notifications.