Can some kind soul show me how to write, or point me to, a SIMPLE Webmachine request to process a POST request; e.g. submitted by something like:
<form name="input" action="yada yada" method="post">
Username: <input type="text" name="fname" />
<input type="submit" value="Submit" />
</form>
Many thanks,
LRP
Given your webmachine resource, you ensure that the 'POST' atom is contained in the list of allowed methods:
Then you can handle your PUT request into the following function:
A tutorial for this is available at:
http://www.planeterlang.org/en/planet/article/The_BeeBole_ErlangWeb_Tutorial_Webmachine-Style/
Here's another example on how to manage a simple POST request:
https://bitbucket.org/bryan/wmexamples/src/tip/src/formjson_resource.erl