plug
Faraday
Our great sponsors
plug | Faraday | |
---|---|---|
6 | 5 | |
2,756 | 5,658 | |
0.5% | 0.5% | |
7.7 | 8.0 | |
10 days ago | 24 days ago | |
Elixir | Ruby | |
Apache License 2.0 | MIT License |
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.
plug
-
Elixir for Cynical Curmudgeons
Yes, it’s a bit of a magic argument, but it’s the only unhygienic variable introduced with a Plug dispatch:
https://github.com/elixir-plug/plug/blob/main/lib/plug/route...
Everything else is explicitly passed, AFAICT.
-
I'm struggling with creating a rest api with Elixir - total noob
Have you read https://github.com/elixir-plug/plug ? Shows you how to do a GET in under 5 mins.
- ElixirのHTTPクライアントでお天気情報を取得したい(2022年)
-
Request Coalescing in Async Rust
Coming from the Ruby ecosystem, a lot of this played out similarly to how the Rack[1] middleware conventions developed in the early Rails v1 and v2 days. Prior to Rack there was a lot of fragmentation in HTTP server libraries, post-Rack everything more or less played nicely as long as libraries implemented Rack interfaces.
I don't write Rust professionally, but it was a bummer seeing that this seems to be a place that was figured out (painfully) in ecosystems used heavily for web development--Javascript and Elixir have their own Rack equivalents[2][3]. I hope that Tower plays a similar role to unify the library ecosystem in Rust.
1. https://github.com/rack/rack
2. http://expressjs.com/en/guide/writing-middleware.html
3. https://github.com/elixir-plug/plug
-
Learn how to deploy Elixir apps on Heroku
If you're not familiar with it, feel free to check the inner workings of Plug in their documentation. For now, the code above is fairly self-explanatory I hope. All we need to know is that we're using the Plug.Router capabilities and exposing an endpoint /bpi which we're going to use to retrieve our data and to show it.
-
For Web Developers The Stakes Are Generally Lower
Well if Phoenix came with the ability to use Sqlite I'd definitely like it a lot better for smaller sites. Maybe if Elixir had something like Sinatra. I guess using Cowboy or Plug could work.
Faraday
-
hash keys to method names
The best starting point is the Faraday Website, with its introduction and explanation Need more details? See the Faraday API Documentation to see how it works internally.
- ElixirのHTTPクライアントでお天気情報を取得したい(2022年)
-
NTLM authentication with Ruby and Faraday
Net::HTTP is good. Even so, how to authenticate with popular gem, for instance Faraday? I started to figure out how to implement the protocol with Faraday 🤔
-
Testing external APIs with Rspec and WebMock
I'm too tied to the implementation. If one day I decide to use Faraday or HTTParty as my HTTP clients instead of Net::HTTP, this test will fail.
What are some alternatives?
ex_admin - ExAdmin is an auto administration package for Elixir and the Phoenix Framework
RESTClient - Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions.
phoenix_ecto - Phoenix and Ecto integration with support for concurrent acceptance testing
httparty - :tada: Makes http fun again!
Raxx - Interface for HTTP webservers, frameworks and clients
Typhoeus - Typhoeus wraps libcurl in order to make fast and reliable requests.
phoenix_pubsub_redis - The Redis PubSub adapter for the Phoenix framework
HTTP - HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts
corsica - Elixir library for dealing with CORS requests. 🏖
Http Client - 'httpclient' gives something like the functionality of libwww-perl (LWP) in Ruby.
phoenix_live_reload - Provides live-reload functionality for Phoenix
excon - Usable, fast, simple HTTP 1.1 for Ruby