Before, the response object was being copied when the lambda was created. That resulted in the callback being called with a copy of the response that does not have the response information.
The fix is to make it by reference instead of copy. Since the lifetime of this object is the same as the function, that will always be valid.
Before, the response object was being copied when the lambda was created. That resulted in the callback being called with a copy of the response that does not have the response information.
The fix is to make it by reference instead of copy. Since the lifetime of this object is the same as the function, that will always be valid.