Source

wmexamples / priv / dispatch.conf

Diff from to

priv/dispatch.conf

  sampletrace_resource,
  []}.
 
+%% x-www-form-urlencoded -> JSON translator
+%% Converts form data to JSON data.
+%% Try:
+%%    curl "http://localhost:8000/formjson?one=two&me=pope"
+%%    curl -X POST http://localhost:8000/formjson \
+%%         -d "one=two&me=pope"
+{["formjson"],      %% exposed at /formjson
+ formjson_resource, %% defined in formjson_resource
+ []}.               %% no configuration
+
 
 %% File Resource
 %% Serve files from disk.