{"action":"created","comment":{"url":"https://api.github.com/repos/php-http/documentation/pulls/comments/50603501","id":50603501,"diff_hunk":"@@ -0,0 +1,143 @@\n+Header Plugins\n+==============\n+\n+Header plugins are useful to manage request headers. Many operations are possible:\n+\n+Default headers values\n+----------------------\n+\n+The plugin Http\\Plugins\\HeaderDefaultPlugin allows to set default values for given headers.\n+That means if the request hasn't already a given header it will be set,\n+but if the request already has a value for the given header then the request wont be changed\n+\n+.. code:: php\n+\n+    use Http\\Discovery\\HttpClientDiscovery;\n+    use Http\\Plugins\\PluginClient;\n+    use Http\\Plugins\\HeaderDefaultPlugin;\n+\n+    $defaultUserAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1';\n+\n+    $headerDefaultPlugin = new HeaderDefaultPlugin([\n+        'User-Agent' => $defaultUserAgent\n+    ]);\n+\n+    $pluginClient = new PluginClient(\n+        HttpClientDiscovery::find(),\n+        [$headerDefaultPlugin]\n+    );\n+\n+Mandatory headers values\n+------------------------\n+\n+The Http\\Plugins\\HeaderSetPlugin allows to fix values of given header. That mean that any request passing through","path":"plugins/headers.rst","position":33,"original_position":33,"commit_id":"589dc7ffd327e93cd0a7ba7c6b978aa029cc1daa","original_commit_id":"589dc7ffd327e93cd0a7ba7c6b978aa029cc1daa","user":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"body":"I means that?","created_at":"2016-01-22T23:07:20Z","updated_at":"2016-01-22T23:07:20Z","html_url":"https://github.com/php-http/documentation/pull/77#discussion_r50603501","pull_request_url":"https://api.github.com/repos/php-http/documentation/pulls/77","_links":{"self":{"href":"https://api.github.com/repos/php-http/documentation/pulls/comments/50603501"},"html":{"href":"https://github.com/php-http/documentation/pull/77#discussion_r50603501"},"pull_request":{"href":"https://api.github.com/repos/php-http/documentation/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/php-http/documentation/pulls/77","id":56285675,"html_url":"https://github.com/php-http/documentation/pull/77","diff_url":"https://github.com/php-http/documentation/pull/77.diff","patch_url":"https://github.com/php-http/documentation/pull/77.patch","issue_url":"https://api.github.com/repos/php-http/documentation/issues/77","number":77,"state":"open","locked":false,"title":"[WCM] Header plugin","user":{"login":"gsouf","id":3215399,"avatar_url":"https://avatars.githubusercontent.com/u/3215399?v=3","gravatar_id":"","url":"https://api.github.com/users/gsouf","html_url":"https://github.com/gsouf","followers_url":"https://api.github.com/users/gsouf/followers","following_url":"https://api.github.com/users/gsouf/following{/other_user}","gists_url":"https://api.github.com/users/gsouf/gists{/gist_id}","starred_url":"https://api.github.com/users/gsouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsouf/subscriptions","organizations_url":"https://api.github.com/users/gsouf/orgs","repos_url":"https://api.github.com/users/gsouf/repos","events_url":"https://api.github.com/users/gsouf/events{/privacy}","received_events_url":"https://api.github.com/users/gsouf/received_events","type":"User","site_admin":false},"body":"document https://github.com/php-http/plugins/pull/44","created_at":"2016-01-17T19:56:33Z","updated_at":"2016-01-22T23:07:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1177f86f92c5025d973106afb041d45732d11ccb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/php-http/documentation/pulls/77/commits","review_comments_url":"https://api.github.com/repos/php-http/documentation/pulls/77/comments","review_comment_url":"https://api.github.com/repos/php-http/documentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/php-http/documentation/issues/77/comments","statuses_url":"https://api.github.com/repos/php-http/documentation/statuses/589dc7ffd327e93cd0a7ba7c6b978aa029cc1daa","head":{"label":"gsouf:master","ref":"master","sha":"589dc7ffd327e93cd0a7ba7c6b978aa029cc1daa","user":{"login":"gsouf","id":3215399,"avatar_url":"https://avatars.githubusercontent.com/u/3215399?v=3","gravatar_id":"","url":"https://api.github.com/users/gsouf","html_url":"https://github.com/gsouf","followers_url":"https://api.github.com/users/gsouf/followers","following_url":"https://api.github.com/users/gsouf/following{/other_user}","gists_url":"https://api.github.com/users/gsouf/gists{/gist_id}","starred_url":"https://api.github.com/users/gsouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsouf/subscriptions","organizations_url":"https://api.github.com/users/gsouf/orgs","repos_url":"https://api.github.com/users/gsouf/repos","events_url":"https://api.github.com/users/gsouf/events{/privacy}","received_events_url":"https://api.github.com/users/gsouf/received_events","type":"User","site_admin":false},"repo":{"id":49832468,"name":"php-http-documentation","full_name":"gsouf/php-http-documentation","owner":{"login":"gsouf","id":3215399,"avatar_url":"https://avatars.githubusercontent.com/u/3215399?v=3","gravatar_id":"","url":"https://api.github.com/users/gsouf","html_url":"https://github.com/gsouf","followers_url":"https://api.github.com/users/gsouf/followers","following_url":"https://api.github.com/users/gsouf/following{/other_user}","gists_url":"https://api.github.com/users/gsouf/gists{/gist_id}","starred_url":"https://api.github.com/users/gsouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsouf/subscriptions","organizations_url":"https://api.github.com/users/gsouf/orgs","repos_url":"https://api.github.com/users/gsouf/repos","events_url":"https://api.github.com/users/gsouf/events{/privacy}","received_events_url":"https://api.github.com/users/gsouf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gsouf/php-http-documentation","description":"Documentation for PHP-HTTP including HTTPlug","fork":true,"url":"https://api.github.com/repos/gsouf/php-http-documentation","forks_url":"https://api.github.com/repos/gsouf/php-http-documentation/forks","keys_url":"https://api.github.com/repos/gsouf/php-http-documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gsouf/php-http-documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gsouf/php-http-documentation/teams","hooks_url":"https://api.github.com/repos/gsouf/php-http-documentation/hooks","issue_events_url":"https://api.github.com/repos/gsouf/php-http-documentation/issues/events{/number}","events_url":"https://api.github.com/repos/gsouf/php-http-documentation/events","assignees_url":"https://api.github.com/repos/gsouf/php-http-documentation/assignees{/user}","branches_url":"https://api.github.com/repos/gsouf/php-http-documentation/branches{/branch}","tags_url":"https://api.github.com/repos/gsouf/php-http-documentation/tags","blobs_url":"https://api.github.com/repos/gsouf/php-http-documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gsouf/php-http-documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gsouf/php-http-documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/gsouf/php-http-documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gsouf/php-http-documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/gsouf/php-http-documentation/languages","stargazers_url":"https://api.github.com/repos/gsouf/php-http-documentation/stargazers","contributors_url":"https://api.github.com/repos/gsouf/php-http-documentation/contributors","subscribers_url":"https://api.github.com/repos/gsouf/php-http-documentation/subscribers","subscription_url":"https://api.github.com/repos/gsouf/php-http-documentation/subscription","commits_url":"https://api.github.com/repos/gsouf/php-http-documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/gsouf/php-http-documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/gsouf/php-http-documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/gsouf/php-http-documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/gsouf/php-http-documentation/contents/{+path}","compare_url":"https://api.github.com/repos/gsouf/php-http-documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gsouf/php-http-documentation/merges","archive_url":"https://api.github.com/repos/gsouf/php-http-documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gsouf/php-http-documentation/downloads","issues_url":"https://api.github.com/repos/gsouf/php-http-documentation/issues{/number}","pulls_url":"https://api.github.com/repos/gsouf/php-http-documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/gsouf/php-http-documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/gsouf/php-http-documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gsouf/php-http-documentation/labels{/name}","releases_url":"https://api.github.com/repos/gsouf/php-http-documentation/releases{/id}","deployments_url":"https://api.github.com/repos/gsouf/php-http-documentation/deployments","created_at":"2016-01-17T19:41:21Z","updated_at":"2016-01-17T19:41:34Z","pushed_at":"2016-01-22T21:49:36Z","git_url":"git://github.com/gsouf/php-http-documentation.git","ssh_url":"git@github.com:gsouf/php-http-documentation.git","clone_url":"https://github.com/gsouf/php-http-documentation.git","svn_url":"https://github.com/gsouf/php-http-documentation","homepage":"http://docs.php-http.org","size":139,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"php-http:master","ref":"master","sha":"1989a3dc816e7fc064606917acdd5fc4452cc298","user":{"login":"php-http","id":12104859,"avatar_url":"https://avatars.githubusercontent.com/u/12104859?v=3","gravatar_id":"","url":"https://api.github.com/users/php-http","html_url":"https://github.com/php-http","followers_url":"https://api.github.com/users/php-http/followers","following_url":"https://api.github.com/users/php-http/following{/other_user}","gists_url":"https://api.github.com/users/php-http/gists{/gist_id}","starred_url":"https://api.github.com/users/php-http/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-http/subscriptions","organizations_url":"https://api.github.com/users/php-http/orgs","repos_url":"https://api.github.com/users/php-http/repos","events_url":"https://api.github.com/users/php-http/events{/privacy}","received_events_url":"https://api.github.com/users/php-http/received_events","type":"Organization","site_admin":false},"repo":{"id":37063526,"name":"documentation","full_name":"php-http/documentation","owner":{"login":"php-http","id":12104859,"avatar_url":"https://avatars.githubusercontent.com/u/12104859?v=3","gravatar_id":"","url":"https://api.github.com/users/php-http","html_url":"https://github.com/php-http","followers_url":"https://api.github.com/users/php-http/followers","following_url":"https://api.github.com/users/php-http/following{/other_user}","gists_url":"https://api.github.com/users/php-http/gists{/gist_id}","starred_url":"https://api.github.com/users/php-http/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-http/subscriptions","organizations_url":"https://api.github.com/users/php-http/orgs","repos_url":"https://api.github.com/users/php-http/repos","events_url":"https://api.github.com/users/php-http/events{/privacy}","received_events_url":"https://api.github.com/users/php-http/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/php-http/documentation","description":"Documentation for PHP-HTTP including HTTPlug","fork":false,"url":"https://api.github.com/repos/php-http/documentation","forks_url":"https://api.github.com/repos/php-http/documentation/forks","keys_url":"https://api.github.com/repos/php-http/documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php-http/documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php-http/documentation/teams","hooks_url":"https://api.github.com/repos/php-http/documentation/hooks","issue_events_url":"https://api.github.com/repos/php-http/documentation/issues/events{/number}","events_url":"https://api.github.com/repos/php-http/documentation/events","assignees_url":"https://api.github.com/repos/php-http/documentation/assignees{/user}","branches_url":"https://api.github.com/repos/php-http/documentation/branches{/branch}","tags_url":"https://api.github.com/repos/php-http/documentation/tags","blobs_url":"https://api.github.com/repos/php-http/documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php-http/documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php-http/documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/php-http/documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php-http/documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/php-http/documentation/languages","stargazers_url":"https://api.github.com/repos/php-http/documentation/stargazers","contributors_url":"https://api.github.com/repos/php-http/documentation/contributors","subscribers_url":"https://api.github.com/repos/php-http/documentation/subscribers","subscription_url":"https://api.github.com/repos/php-http/documentation/subscription","commits_url":"https://api.github.com/repos/php-http/documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/php-http/documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/php-http/documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/php-http/documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/php-http/documentation/contents/{+path}","compare_url":"https://api.github.com/repos/php-http/documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php-http/documentation/merges","archive_url":"https://api.github.com/repos/php-http/documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php-http/documentation/downloads","issues_url":"https://api.github.com/repos/php-http/documentation/issues{/number}","pulls_url":"https://api.github.com/repos/php-http/documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/php-http/documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/php-http/documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php-http/documentation/labels{/name}","releases_url":"https://api.github.com/repos/php-http/documentation/releases{/id}","deployments_url":"https://api.github.com/repos/php-http/documentation/deployments","created_at":"2015-06-08T11:44:22Z","updated_at":"2016-01-04T21:37:44Z","pushed_at":"2016-01-22T21:49:37Z","git_url":"git://github.com/php-http/documentation.git","ssh_url":"git@github.com:php-http/documentation.git","clone_url":"https://github.com/php-http/documentation.git","svn_url":"https://github.com/php-http/documentation","homepage":"http://docs.php-http.org","size":147,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":21,"forks":6,"open_issues":21,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/php-http/documentation/pulls/77"},"html":{"href":"https://github.com/php-http/documentation/pull/77"},"issue":{"href":"https://api.github.com/repos/php-http/documentation/issues/77"},"comments":{"href":"https://api.github.com/repos/php-http/documentation/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/php-http/documentation/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/php-http/documentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/php-http/documentation/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/php-http/documentation/statuses/589dc7ffd327e93cd0a7ba7c6b978aa029cc1daa"}}}}