{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/facebook-php-sdk-v4/issues/446","labels_url":"https://api.github.com/repos/facebook/facebook-php-sdk-v4/issues/446/labels{/name}","comments_url":"https://api.github.com/repos/facebook/facebook-php-sdk-v4/issues/446/comments","events_url":"https://api.github.com/repos/facebook/facebook-php-sdk-v4/issues/446/events","html_url":"https://github.com/facebook/facebook-php-sdk-v4/issues/446","id":82102357,"number":446,"title":"Set Curl options dynamically","user":{"login":"samward1985","id":1438328,"avatar_url":"https://avatars.githubusercontent.com/u/1438328?v=3","gravatar_id":"","url":"https://api.github.com/users/samward1985","html_url":"https://github.com/samward1985","followers_url":"https://api.github.com/users/samward1985/followers","following_url":"https://api.github.com/users/samward1985/following{/other_user}","gists_url":"https://api.github.com/users/samward1985/gists{/gist_id}","starred_url":"https://api.github.com/users/samward1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samward1985/subscriptions","organizations_url":"https://api.github.com/users/samward1985/orgs","repos_url":"https://api.github.com/users/samward1985/repos","events_url":"https://api.github.com/users/samward1985/events{/privacy}","received_events_url":"https://api.github.com/users/samward1985/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-28T20:02:53Z","updated_at":"2015-05-29T17:35:52Z","closed_at":null,"body":"Currently, there doesn't seem to be a way to cleanly set Curl options (CURLOPT_CONNECTTIMEOUT, CURLOPT_TIMEOUT, etc.) when using FacebookRequest->execute(). As it is, FacebookCurlHttpClient->send() gets called, which opens the connection and sets a static set of Curl options. It'd be cool if, for example, we could set the HttpClientHandler and pass Curl options to it before executing the request, sort of how FacebookCurlHttpClient->addRequestHeader() works."},"comment":{"url":"https://api.github.com/repos/facebook/facebook-php-sdk-v4/issues/comments/106881798","html_url":"https://github.com/facebook/facebook-php-sdk-v4/issues/446#issuecomment-106881798","issue_url":"https://api.github.com/repos/facebook/facebook-php-sdk-v4/issues/446","id":106881798,"user":{"login":"SammyK","id":578780,"avatar_url":"https://avatars.githubusercontent.com/u/578780?v=3","gravatar_id":"","url":"https://api.github.com/users/SammyK","html_url":"https://github.com/SammyK","followers_url":"https://api.github.com/users/SammyK/followers","following_url":"https://api.github.com/users/SammyK/following{/other_user}","gists_url":"https://api.github.com/users/SammyK/gists{/gist_id}","starred_url":"https://api.github.com/users/SammyK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SammyK/subscriptions","organizations_url":"https://api.github.com/users/SammyK/orgs","repos_url":"https://api.github.com/users/SammyK/repos","events_url":"https://api.github.com/users/SammyK/events{/privacy}","received_events_url":"https://api.github.com/users/SammyK/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T17:35:52Z","updated_at":"2015-05-29T17:35:52Z","body":"In v4.0 of the SDK you can overwrite the HTTP client with your own handler using your own options. So you can have a custom cURL handler and inject it. I wrote a blog about [injecting custom HTTP clients into v4.0](https://www.sammyk.me/using-guzzle-4-http-client-with-facebook-php-sdk-v4) that might help."}}