Improve line parsing and allow user to specify actionid for a request

Thank you for this module, was very useful for me, it's the core of a new internal product in my company.