Skip to content

Question: How to add a default middleware to all faraday client instances? #946

@danielgatis

Description

@danielgatis

Hi,
How is the correct way to add a default middleware to all faraday client instances?

Example:

My middleware:

class MyMiddlware < Faraday::Middleware 
  def call ...
end

My clients:

conn1 = Faraday.new(url)
conn2 = Faraday.new(url)

I expected that all my clients (conn1, conn2) use MyMiddlware as default.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions