changed operations to return a response promise to move assertion checking to the core, implemented content length assertion