Optionally specify on_data and on_end in response's constructor