reroute VS req

Compare reroute vs req and see what are their differences.

reroute

Another Haskell web framework for rapid development (by agrafix)

req

Req is a batteries-included HTTP client for Elixir. (by wojtekmach)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
reroute req
3 3
677 838
- -
2.7 9.4
17 days ago 2 days ago
Haskell Elixir
MIT License -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

reroute

Posts with mentions or reviews of reroute. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-04-28.
  • Error whilst installing Spock (via stack)
    1 project | /r/haskell | 31 Oct 2022
    It's not you, it's a Spock issue: https://github.com/agrafix/Spock/issues/180
  • Spock web framework routing question
    2 projects | /r/haskell | 28 Apr 2021
    Thanks, you are probably correct. Mistaken with insertion & matching functions working on a 2nd parameter of PathMap which is a plain list. Digged through Spock calls and ended up at hookRoute which builds-up an actual routing data structure, ie. strict HashMap.

req

Posts with mentions or reviews of req. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-17.
  • How to implement a disk cache plugin for Elixir's Req HTTP client?
    5 projects | news.ycombinator.com | 17 Aug 2023
    > no error checking at all (I assume it just panics or exception?)

    In Elixir, bang functions per convention will raise on error. `get/2` will return error tuples allowing you to handle errors. In fact, get!/2 just calls get/2 and raises for you[^1].

    > no mention of JSON at all

    Req is the most "batteries included" Elixir HTTP lib out there. I can't speak for Wojtek, but I believe the goal was to make Req extremely easy to use in scripting or things like LiveBook without having to do much work. That being said, the automatic decoding is mentioned in the readme[^2] and the docs[^3].

    > if "body" is JSON, how do you even get the raw body, or can you?

    Per the docs[^3], you can either skip with a `:raw` option, or just build your own request using only the steps you want.

    > just seems over engineered/over fitted whatever you want to call it.

    Fair, but again, this library is designed to be on that end of the spectrum. There are plenty of other libraries further down the stack that you can use. I am partial to Finch[^4], upon which Req is built.

    To address the sibling comment about "Let it Crash", the language allows you to easily recover from crashes, but that is for resiliency, not error handling. In practice you would use the non-bang get/2, pattern match on the response, handle any errors, perhaps use Kernel.get_in/2 to safely traverse the map, etc. The example provided by the author is not "production ready".

    [^1]: https://github.com/wojtekmach/req/blob/v0.3.11/lib/req.ex#L3...

  • A Breakdown of HTTP Clients in Elixir
    1 project | news.ycombinator.com | 25 Jul 2023

What are some alternatives?

When comparing reroute and req you can also consider the following projects:

scotty - Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository)

tesla - The flexible HTTP client library for Elixir, with support for middleware and multiple adapters.

open-browser - Haskell library for opening the web browser.

httpotion - [Deprecated because ibrowse is not maintained] HTTP client for Elixir (use Tesla please)

haskell-kubernetes

httpoison - Yet Another HTTP client for Elixir powered by hackney

forecast-io - A Haskell library for working with forecast.io data.

mint - Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱

swagger-petstore - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

finch - Elixir HTTP client, focused on performance

inquire