attaching cookies to requests and added put and delete to Eric's refactoring