Similar to the redirect API, we should support a cookie handling API for reading and setting cookies uniformly on both sides of the wire. /cc @gregstewart