microscope v1.3.0 Microscope.Callback behaviour

A behaviour module for implementing callback modules for Microscope static web server.

Link to this section Summary

Callbacks

Called when the server replied with HTTP 200 (OK).

Called when the server replied with HTTP 404 (Not Found).

Called when the server received a request, and before the server sends a response.

Link to this section Callbacks

Link to this callback

on_200(from, method, path)
on_200(from :: String.t(), method :: String.t(), path :: String.t()) ::
  no_return()

Called when the server replied with HTTP 200 (OK).

Link to this callback

on_404(from, method, path)
on_404(from :: String.t(), method :: String.t(), path :: String.t()) ::
  no_return()

Called when the server replied with HTTP 404 (Not Found).

Link to this callback

on_request()
on_request() :: no_return()

Called when the server received a request, and before the server sends a response.