POST = insert
PUT = update
Got POST/PUT working for JSON requests. TODO: plain XML REST requests