HttpResponse::setContentType
HttpResponse::setETag
HttpResponse
PHP Manual

# HttpResponse::setData

(PECL pecl_http >= 0.10.0)

HttpResponse::setData — Set data

### Description

static bool HttpResponse::setData ( mixed `$data` )

Set the data to be sent.

> Note: Previously calculated or defined ETag and Last-Modified will be recalculated and redefined.

### Parameters

`data`

  data to send

### Return Values

Returns `TRUE` on success or `FALSE` on failure.

### See Also

- HttpResponse::getData() - Get data
- HttpResponse::getFile() - Get file
- HttpResponse::setFile() - Set file
- HttpResponse::getStream() - Get Stream
- HttpResponse::setStream() - Set stream

HttpResponse::setContentType
HttpResponse::setETag
HttpResponse
PHP Manual