Update client code to return an object.

So that callers can abort the request and inspect the request.