View Source Tesla.Middleware.MethodOverride (tesla v1.7.0)

Middleware that adds X-HTTP-Method-Override header with original request method and sends the request as post.

Useful when there's an issue with sending non-POST request.

examples

Examples

defmodule MyClient do
  use Tesla

  plug Tesla.Middleware.MethodOverride
end

options

Options

  • :override - list of HTTP methods that should be overridden, everything except :get and :post if not specified