microscope v0.4.0 Microscope.Callback behaviour

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

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

Callbacks

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).

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).

on_request()
on_request() :: no_return

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