accept_callback_missing_h.erl 381 B

123456789101112131415
  1. -module(accept_callback_missing_h).
  2. -export([init/2]).
  3. -export([allowed_methods/2]).
  4. -export([content_types_accepted/2]).
  5. init(Req, State) ->
  6. {cowboy_rest, Req, State}.
  7. allowed_methods(Req, State) ->
  8. {[<<"PUT">>], Req, State}.
  9. content_types_accepted(Req, State) ->
  10. ct_helper_error_h:ignore(cowboy_rest, process_content_type, 3),
  11. {[{<<"text/plain">>, accept}], Req, State}.