YfyRawResponse
class YfyRawResponse
Class YfyRawResponse
Properties
protected array | $headers | ||
protected StreamInterface | $body | ||
protected int | $httpResponseCode |
Methods
__construct(string|array $headers, StreamInterface $body, int $httpStatusCode = null)
YfyRawResponse constructor.
array
getHeaders()
获取header数组
StreamInterface
getBody()
获取返回的流
int
getHttpResponseCode()
获取返回的status code
setHeadersFromString(string $rawHeaders)
将返回的string解析为header数组
saveToFile(string $savePath)
将请求返回结果存储为文件(通常用于下载文件)
createDownloadFile()
将请求返回结果以DownloadFile的形式返回给用户
Details
at line 40
__construct(string|array $headers, StreamInterface $body, int $httpStatusCode = null)
YfyRawResponse constructor.
at line 60
array
getHeaders()
获取header数组
at line 70
StreamInterface
getBody()
获取返回的流
at line 80
int
getHttpResponseCode()
获取返回的status code
at line 101
protected
setHeadersFromString(string $rawHeaders)
将返回的string解析为header数组
at line 129
saveToFile(string $savePath)
将请求返回结果存储为文件(通常用于下载文件)
at line 146
DownloadFile
createDownloadFile()
将请求返回结果以DownloadFile的形式返回给用户