Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be great if response type were something we could pattern-match over #110

Closed
Trevoke opened this issue May 17, 2017 · 5 comments
Closed

Comments

@Trevoke
Copy link

Trevoke commented May 17, 2017

So for instance

{:ok, resp = HTTPotionResponse%{}} = HTTPotion.get("www.foo.bar")

It would help us get a lot more value out of this tool.

@valpackett
Copy link
Owner

You can pattern match on structs.

As for returning an exception instead of a value when connection fails… you're about four years too late with this :) I realize that I probably shouldn't have used exceptions, but back then I thought they were more idiomatic Elixir. I'm not going to commit such huge changes to the public API now.

@Trevoke
Copy link
Author

Trevoke commented May 17, 2017 via email

@valpackett
Copy link
Owner

Yeah. I don't want to release a new one. I think the API is fine as it is.

@Trevoke
Copy link
Author

Trevoke commented May 17, 2017

I can't blame you; it's your project :)

I have in the meanwhile found HTTPoison which seems to behave the way I like, so I think I will use it.

Thank you for entertaining my requests!

@Trevoke Trevoke closed this as completed May 17, 2017
@valpackett
Copy link
Owner

oh wow, they not only replaced ibrowse with hackney, but also did that. Nice :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants