Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Pass proper arguments to the Response constructor #895

Merged
merged 1 commit into from
Aug 31, 2017
Merged

[4.0] Pass proper arguments to the Response constructor #895

merged 1 commit into from
Aug 31, 2017

Conversation

xuxucode
Copy link
Contributor

\GuzzleHttp\Psr7\Response::__construct 的签名:

    /**
     * @param int                                  $status  Status code
     * @param array                                $headers Response headers
     * @param string|null|resource|StreamInterface $body    Response body
     * @param string                               $version Protocol version
     * @param string|null                          $reason  Reason phrase (when empty a default will be used based on the status code)
     */
    public function __construct(
        $status = 200,
        array $headers = [],
        $body = null,
        $version = '1.1',
        $reason = null
    ) {

body 为第三个参数

@overtrue overtrue merged commit 0c2f8d2 into w7corp:master Aug 31, 2017
overtrue added a commit that referenced this pull request Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants