added a framework for request parsing
more work on the api