Powered by AppSignal & Oban Pro

Untitled notebook

notebooks/api.livemd

Untitled notebook

Mix.install([
  {:httpoison, "~> 1.8"}
])

API

In our Vue Code

HTTP


flowchart LR

Client --request--> Server
Server --response--> Client
flowchart
Client --> Port3000
Server --> Port4000

Port3000 --> ping[get api/ping] --> Port4000
Port4000 --> respond[respond json] --> Port3000
response = HTTPoison.get("localhost:5000/api/ping")
{:ok, %HTTPoison.Response{}} = response