Added functionality to define custom handlers, for now only supports POST to collection.