erlang-github
erlang-github copied to clipboard
Avoid needing to call jsx:decode/1 more than once per request.
egithub_webhook:request()
should be opaque and have this spec: #{headers => map(), body => map() | binary()}.
Use a function to get the body which always returns a map and if the body in the request is a binary, parses it and returns the new request. Similar to what cowboy does.