Nothing Special   »   [go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Implement Custom Middleware/Authorization for import endpoint #3

Open
tylersamples opened this issue Sep 5, 2018 · 0 comments
Open

Comments

@tylersamples
Copy link
Contributor

The importer config should support a middleware option where a it accepts a capture Middleware.import/0.

A high level middleware should look like so:

defmodule Middleware do
  use Tesla

  plug Tesla.Middleware.BaseUrl, "https://api.excourtbot.com"
  plug Tesla.Middleware.Headers, [{"authorization", "token xyz"}]
  plug Tesla.Middleware.JSON

  def import() do
    get("/todays-data")
  end
end
@tylersamples tylersamples added this to the 1.0.0 milestone Sep 24, 2018
@tylersamples tylersamples removed this from the 1.0.0 milestone Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant