The flexible HTTP client library for Elixir, with support for middleware and multiple adapters. Tesla is an HTTP client loosely based on Faraday. It embraces the concept of middleware when processing the request/response cycle. Define module with use Tesla and choose from a variety of middleware. Tesla is built around the concept of composable middlewares. This is very similar to how Plug Router works. All HTTP functions, such as Tesla.get/3 and Tesla.post/4, can take a dynamic client as the first argument. This allows using convenient syntax for modifying the behavior in runtime. Tesla supports multiple HTTP adapter that do the actual HTTP request processing. Each piece of the stream will be encoded as JSON and sent as a new line (conforming to JSON stream format). You can set the adapter to Tesla.Mock in tests.

Features

  • Define module with use Tesla and choose from a variety of middleware
  • Configure default adapter in config/config.exs (optional)
  • Tesla uses Semantic Versioning 2.0
  • Tesla is built around the concept of composable middlewares
  • Runtime middleware
  • Tesla supports multiple HTTP adapter that do the actual HTTP request processing

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Tesla

Tesla Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Tesla!

Additional Project Details

Programming Language

Elixir

Related Categories

Elixir HTML XHTML, Elixir Libraries, Elixir HTTP Clients

Registered

2022-10-07