yordisprieto
Tesla is an HTTP client that leverages middleware to streamline HTTP requests and responses over a common interface for various adapters.
It simplifies HTTP communication by providing a flexible and composable middleware stack. Developers can easily build custom API clients by stacking middleware components that handle tasks like authentication, logging, and retries. Tesla supports multiple HTTP adapters such as Mint, Finch, Hackney, etc.
Tesla is ideal for developers who need a flexible and efficient HTTP client. Its ability to swap out HTTP adapters and create custom middleware pipelines empowers you to make different architectural decisions and build tools tailored to your application’s needs with minimal effort.
Inspired by Faraday from Ruby.
https://github.com/elixir-tesla/tesla
Please check Tesla’s latest documentation update at Tesla — tesla v1.20.0.
I would appreciate any feedback about it. I need a different perspective to make sure the documentation covers most personas. The In-Module documentation is still WIP; I focused on guides and the getting started experience.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
yordisprieto
Tesla v1.13 introduces
Tesla.Testmodule and direct integration withMoxYou can read more about How-To at Test Using Mox — tesla v1.20.0yordisprieto
We have a cool logo!
bgoosman
I’ve been using Req mostly. How would you compare Req to Tesla?
yordisprieto
I use both; it all depends.
Req is excellent for getting something working very fast. At the same time, I use Tesla for predictable SDKs since Tesla barely includes anything by default, and Tesla has been around and used in production quite a bit.
You can check the built-in steps/middleware and the defaults you like; to me, they are the same, just different starting points.
yordisprieto
Sharing here for visibility, I need folks opinions about chore: add warning message to Tesla.Builder by yordis · Pull Request #621 · elixir-tesla/tesla · GitHub
References
adamu
For me
Tesla.Middlewear.Loggeris great for debugging as you can log the whole request/response. I believe the architecture of Req makes this difficult as there is no way to hook into the entire communication cycle.I also find that the Tesla Middlewear model is simpler than Req’s, which requires more boilerplate and is a bit harder to get your head around, at least that was my impression from writing equivalent middlewear for both clients:
Tesla:
Req:
pau-riosa
Hi guys, how can I consume a stream from a get request using Tesla?
I am using Tesla.Adapter.Finch and wanted to consume an audio/wave file using stream.