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

not going into timeout case #36

Closed
surendiranganesan opened this issue Oct 1, 2016 · 2 comments
Closed

not going into timeout case #36

surendiranganesan opened this issue Oct 1, 2016 · 2 comments

Comments

@surendiranganesan
Copy link

surendiranganesan commented Oct 1, 2016

Hi,

I have tried the example shown in your main page.

public function actionGetAdvancedExample()
{
        //Init curl
        $curl = new curl\Curl();

        //get http://example.com/
        $response = $curl->post('http://www.google.com:81/');

        // List of status codes here http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
        switch ($curl->responseCode) {

            case 'timeout':
                //timeout error logic here
                break;

            case 200:
                //success logic here
                break;

            case 404:
                //404 Error logic here
                break;
        }
}

but its not going into timeout case its going into default case only.

kindly help me on this i tried with both get and post.

regards,

@linslin
Copy link
Owner

linslin commented Oct 1, 2016

Hi @surendiranganesan,

many thanks for your response. We gonna check this the next days.

linslin added a commit that referenced this issue Oct 28, 2016
… "responseType", "reponseCharset" and "responseLength".
@linslin
Copy link
Owner

linslin commented Oct 28, 2016

Thanks, its fixed in 1.0.9.

@linslin linslin closed this as completed Oct 28, 2016
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

No branches or pull requests

2 participants