I'm sorry for the string of plugin questions, but I'm struggling to find the information I need. Once I finish this batch of plugins, I'll make some suggestions for the documentation.
Anyway, I can't seem to find a plugin (including login) that returns arbitrary status codes. I'm accepting POSTs at a specific URL and want to return a variety of codes depending on the inputs: 200, 201, 202, 400, and 500, specifically (and eventually 410). The login plugin has helped me learn how to add custom routes, and I know my code is being executed, but I don't know how to end the function—how to actually send the correct response. The login plugin only sends session messages. And as far as I can see in the code, it redirects to various places but never actually sends appropriate status codes.
Any assistance greatly appreciated.