OOP. Exits when an expectation is not met

JSON objects represent individual requests, not pages
They have a property "expect" which defines HTTP status code and header
expectations
+ default request session, - useless imports

regexps and os are no longer needed in main
Added default session = 0 to fix crash when omitting 'session' in json