{"action":"created","issue":{"url":"https://api.github.com/repos/linslin/Yii2-Curl/issues/14","labels_url":"https://api.github.com/repos/linslin/Yii2-Curl/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/linslin/Yii2-Curl/issues/14/comments","events_url":"https://api.github.com/repos/linslin/Yii2-Curl/issues/14/events","html_url":"https://github.com/linslin/Yii2-Curl/issues/14","id":60207834,"number":14,"title":"how to do this by yii2-curl","user":{"login":"djfly","id":4409731,"avatar_url":"https://avatars.githubusercontent.com/u/4409731?v=3","gravatar_id":"","url":"https://api.github.com/users/djfly","html_url":"https://github.com/djfly","followers_url":"https://api.github.com/users/djfly/followers","following_url":"https://api.github.com/users/djfly/following{/other_user}","gists_url":"https://api.github.com/users/djfly/gists{/gist_id}","starred_url":"https://api.github.com/users/djfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djfly/subscriptions","organizations_url":"https://api.github.com/users/djfly/orgs","repos_url":"https://api.github.com/users/djfly/repos","events_url":"https://api.github.com/users/djfly/events{/privacy}","received_events_url":"https://api.github.com/users/djfly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/linslin/Yii2-Curl/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-07T14:14:27Z","updated_at":"2015-03-07T16:45:23Z","closed_at":null,"body":"how to do this by yii2-curl\r\n`````\r\ncurl -XPUT 'localhost:9200/customer/external/1?pretty' -d '\r\n{\r\n  \"name\": \"John Doe\"\r\n}'\r\n````\r\n"},"comment":{"url":"https://api.github.com/repos/linslin/Yii2-Curl/issues/comments/77697388","html_url":"https://github.com/linslin/Yii2-Curl/issues/14#issuecomment-77697388","issue_url":"https://api.github.com/repos/linslin/Yii2-Curl/issues/14","id":77697388,"user":{"login":"linslin","id":6159031,"avatar_url":"https://avatars.githubusercontent.com/u/6159031?v=3","gravatar_id":"","url":"https://api.github.com/users/linslin","html_url":"https://github.com/linslin","followers_url":"https://api.github.com/users/linslin/followers","following_url":"https://api.github.com/users/linslin/following{/other_user}","gists_url":"https://api.github.com/users/linslin/gists{/gist_id}","starred_url":"https://api.github.com/users/linslin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linslin/subscriptions","organizations_url":"https://api.github.com/users/linslin/orgs","repos_url":"https://api.github.com/users/linslin/repos","events_url":"https://api.github.com/users/linslin/events{/privacy}","received_events_url":"https://api.github.com/users/linslin/received_events","type":"User","site_admin":false},"created_at":"2015-03-07T16:45:23Z","updated_at":"2015-03-07T16:45:23Z","body":"        //Init curl\r\n        $curl = new curl\\Curl();\r\n\r\n        //post http://example.com/\r\n        $response = $curl->setOption(\r\n                CURLOPT_POSTFIELDS, \r\n                http_build_query(array(\r\n                    'name' => 'John Doe'\r\n                )\r\n            ))\r\n            ->put('http://localhost:9200/customer/external/1?pretty');"}}