appcues / mojito

An easy-to-use Elixir HTTP client, built on the low-level Mint library.
https://hexdocs.pm/mojito/Mojito.html
MIT License
349 stars 34 forks source link

Add a namespace to mojito response messages #15

Closed intentionally-left-nil closed 5 years ago

intentionally-left-nil commented 5 years ago

Mojito lives in the same process as its caller and thus needs to play nice with other messages in its mailbox. This fixes #14

The other way to fix this would be to spawn a new PID for each request to ensure it gets its own mailbox (e.g. Task.async/await), but that seems overkill to me.

mrusme commented 5 years ago

@gamache could we have this PR merged & released? Would like to continue using Mojito in a project, but as of right now this issue makes it impossible to do so. Thank you! 👍

gamache commented 5 years ago

Sorry for the delay on this! I like it and I'm going to roll it out.