{"action":"created","comment":{"url":"https://api.github.com/repos/seanmonstar/reqwest/pulls/comments/120950718","pull_request_review_id":42957279,"id":120950718,"diff_hunk":"@@ -54,7 +80,39 @@ impl Response {\n         }\n     }\n \n-    /// Get the `StatusCode`.\n+    /// Get the `StatusCode` of this `Response`.\n+    ///\n+    /// ```rust\n+    /// # extern crate reqwest;\n+    /// # #[macro_use] extern crate error_chain;\n+    /// # use reqwest::{Client, StatusCode};\n+    /// # use reqwest::header::Location;\n+    /// #\n+    /// # error_chain! {\n+    /// #     foreign_links {\n+    /// #         Reqwest(reqwest::Error);\n+    /// #     }\n+    /// # }\n+    /// #\n+    /// # fn run() -> Result<()> {\n+    /// let client = Client::new()?;\n+    /// let resp = client.post(\"http://httpbin.org/post\")?.send()?;\n+    /// match *resp.status() {\n+    ///     StatusCode::Ok => println!(\"All good!\"),\n+    ///     StatusCode::Found => {\n+    ///         let url = resp.headers().get::<Location>();\n+    ///         println!(\"Received redirect to: {:?}\", url);\n+    ///     }\n+    ///     status => bail!(\"Http Error, Response status: {:?}\", status),\n+    /// };\n+    /// # Ok(())\n+    /// # }\n+    /// # fn main() {","path":"src/response.rs","position":67,"original_position":67,"commit_id":"2e5325d8f335415a74ba964c3d9f168a1a4fcdde","original_commit_id":"2e5325d8f335415a74ba964c3d9f168a1a4fcdde","user":{"login":"seanmonstar","id":51479,"avatar_url":"https://avatars2.githubusercontent.com/u/51479?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmonstar","html_url":"https://github.com/seanmonstar","followers_url":"https://api.github.com/users/seanmonstar/followers","following_url":"https://api.github.com/users/seanmonstar/following{/other_user}","gists_url":"https://api.github.com/users/seanmonstar/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmonstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmonstar/subscriptions","organizations_url":"https://api.github.com/users/seanmonstar/orgs","repos_url":"https://api.github.com/users/seanmonstar/repos","events_url":"https://api.github.com/users/seanmonstar/events{/privacy}","received_events_url":"https://api.github.com/users/seanmonstar/received_events","type":"User","site_admin":false},"body":"Same comment about previous `main` in example. If we skip using `error_chain`, and thus don't need the `extern crate`, the example can just be in a plain `# fn run() -> Result<(), Box<::std::error::Error>>`.","created_at":"2017-06-08T17:33:22Z","updated_at":"2017-06-08T17:43:29Z","html_url":"https://github.com/seanmonstar/reqwest/pull/141#discussion_r120950718","pull_request_url":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/seanmonstar/reqwest/pulls/comments/120950718"},"html":{"href":"https://github.com/seanmonstar/reqwest/pull/141#discussion_r120950718"},"pull_request":{"href":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141","id":124693531,"html_url":"https://github.com/seanmonstar/reqwest/pull/141","diff_url":"https://github.com/seanmonstar/reqwest/pull/141.diff","patch_url":"https://github.com/seanmonstar/reqwest/pull/141.patch","issue_url":"https://api.github.com/repos/seanmonstar/reqwest/issues/141","number":141,"state":"open","locked":false,"title":"Response doc improvements","user":{"login":"jaemk","id":13563490,"avatar_url":"https://avatars3.githubusercontent.com/u/13563490?v=3","gravatar_id":"","url":"https://api.github.com/users/jaemk","html_url":"https://github.com/jaemk","followers_url":"https://api.github.com/users/jaemk/followers","following_url":"https://api.github.com/users/jaemk/following{/other_user}","gists_url":"https://api.github.com/users/jaemk/gists{/gist_id}","starred_url":"https://api.github.com/users/jaemk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaemk/subscriptions","organizations_url":"https://api.github.com/users/jaemk/orgs","repos_url":"https://api.github.com/users/jaemk/repos","events_url":"https://api.github.com/users/jaemk/events{/privacy}","received_events_url":"https://api.github.com/users/jaemk/received_events","type":"User","site_admin":false},"body":"Addresses #115 \r\n- I couldn't think of a less contrived example for `url` than just asserting it hasn't been modified...\r\n- For the `headers` example, I have the file operations commented out so I didn't need to pull in an extra `tempdir` dev dependency. You can uncomment the three file-op lines to test that they work, but I didn't want to leave that in there to be run since it's silently modifying the project directory.","created_at":"2017-06-08T16:33:36Z","updated_at":"2017-06-08T17:43:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b41b170085d5578005ac4c8bdd1e914a78734f4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141/commits","review_comments_url":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141/comments","review_comment_url":"https://api.github.com/repos/seanmonstar/reqwest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seanmonstar/reqwest/issues/141/comments","statuses_url":"https://api.github.com/repos/seanmonstar/reqwest/statuses/2e5325d8f335415a74ba964c3d9f168a1a4fcdde","head":{"label":"jaemk:response_doc","ref":"response_doc","sha":"2e5325d8f335415a74ba964c3d9f168a1a4fcdde","user":{"login":"jaemk","id":13563490,"avatar_url":"https://avatars3.githubusercontent.com/u/13563490?v=3","gravatar_id":"","url":"https://api.github.com/users/jaemk","html_url":"https://github.com/jaemk","followers_url":"https://api.github.com/users/jaemk/followers","following_url":"https://api.github.com/users/jaemk/following{/other_user}","gists_url":"https://api.github.com/users/jaemk/gists{/gist_id}","starred_url":"https://api.github.com/users/jaemk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaemk/subscriptions","organizations_url":"https://api.github.com/users/jaemk/orgs","repos_url":"https://api.github.com/users/jaemk/repos","events_url":"https://api.github.com/users/jaemk/events{/privacy}","received_events_url":"https://api.github.com/users/jaemk/received_events","type":"User","site_admin":false},"repo":{"id":91977260,"name":"reqwest","full_name":"jaemk/reqwest","owner":{"login":"jaemk","id":13563490,"avatar_url":"https://avatars3.githubusercontent.com/u/13563490?v=3","gravatar_id":"","url":"https://api.github.com/users/jaemk","html_url":"https://github.com/jaemk","followers_url":"https://api.github.com/users/jaemk/followers","following_url":"https://api.github.com/users/jaemk/following{/other_user}","gists_url":"https://api.github.com/users/jaemk/gists{/gist_id}","starred_url":"https://api.github.com/users/jaemk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaemk/subscriptions","organizations_url":"https://api.github.com/users/jaemk/orgs","repos_url":"https://api.github.com/users/jaemk/repos","events_url":"https://api.github.com/users/jaemk/events{/privacy}","received_events_url":"https://api.github.com/users/jaemk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaemk/reqwest","description":null,"fork":true,"url":"https://api.github.com/repos/jaemk/reqwest","forks_url":"https://api.github.com/repos/jaemk/reqwest/forks","keys_url":"https://api.github.com/repos/jaemk/reqwest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaemk/reqwest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaemk/reqwest/teams","hooks_url":"https://api.github.com/repos/jaemk/reqwest/hooks","issue_events_url":"https://api.github.com/repos/jaemk/reqwest/issues/events{/number}","events_url":"https://api.github.com/repos/jaemk/reqwest/events","assignees_url":"https://api.github.com/repos/jaemk/reqwest/assignees{/user}","branches_url":"https://api.github.com/repos/jaemk/reqwest/branches{/branch}","tags_url":"https://api.github.com/repos/jaemk/reqwest/tags","blobs_url":"https://api.github.com/repos/jaemk/reqwest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaemk/reqwest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaemk/reqwest/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaemk/reqwest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaemk/reqwest/statuses/{sha}","languages_url":"https://api.github.com/repos/jaemk/reqwest/languages","stargazers_url":"https://api.github.com/repos/jaemk/reqwest/stargazers","contributors_url":"https://api.github.com/repos/jaemk/reqwest/contributors","subscribers_url":"https://api.github.com/repos/jaemk/reqwest/subscribers","subscription_url":"https://api.github.com/repos/jaemk/reqwest/subscription","commits_url":"https://api.github.com/repos/jaemk/reqwest/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaemk/reqwest/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaemk/reqwest/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaemk/reqwest/issues/comments{/number}","contents_url":"https://api.github.com/repos/jaemk/reqwest/contents/{+path}","compare_url":"https://api.github.com/repos/jaemk/reqwest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaemk/reqwest/merges","archive_url":"https://api.github.com/repos/jaemk/reqwest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaemk/reqwest/downloads","issues_url":"https://api.github.com/repos/jaemk/reqwest/issues{/number}","pulls_url":"https://api.github.com/repos/jaemk/reqwest/pulls{/number}","milestones_url":"https://api.github.com/repos/jaemk/reqwest/milestones{/number}","notifications_url":"https://api.github.com/repos/jaemk/reqwest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaemk/reqwest/labels{/name}","releases_url":"https://api.github.com/repos/jaemk/reqwest/releases{/id}","deployments_url":"https://api.github.com/repos/jaemk/reqwest/deployments","created_at":"2017-05-21T18:01:12Z","updated_at":"2017-05-21T18:01:14Z","pushed_at":"2017-06-08T16:21:48Z","git_url":"git://github.com/jaemk/reqwest.git","ssh_url":"git@github.com:jaemk/reqwest.git","clone_url":"https://github.com/jaemk/reqwest.git","svn_url":"https://github.com/jaemk/reqwest","homepage":"https://docs.rs/reqwest","size":180,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"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":"seanmonstar:master","ref":"master","sha":"583fceb51f561494e70d2c092dc55ce173a65ef9","user":{"login":"seanmonstar","id":51479,"avatar_url":"https://avatars2.githubusercontent.com/u/51479?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmonstar","html_url":"https://github.com/seanmonstar","followers_url":"https://api.github.com/users/seanmonstar/followers","following_url":"https://api.github.com/users/seanmonstar/following{/other_user}","gists_url":"https://api.github.com/users/seanmonstar/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmonstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmonstar/subscriptions","organizations_url":"https://api.github.com/users/seanmonstar/orgs","repos_url":"https://api.github.com/users/seanmonstar/repos","events_url":"https://api.github.com/users/seanmonstar/events{/privacy}","received_events_url":"https://api.github.com/users/seanmonstar/received_events","type":"User","site_admin":false},"repo":{"id":62350380,"name":"reqwest","full_name":"seanmonstar/reqwest","owner":{"login":"seanmonstar","id":51479,"avatar_url":"https://avatars2.githubusercontent.com/u/51479?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmonstar","html_url":"https://github.com/seanmonstar","followers_url":"https://api.github.com/users/seanmonstar/followers","following_url":"https://api.github.com/users/seanmonstar/following{/other_user}","gists_url":"https://api.github.com/users/seanmonstar/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmonstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmonstar/subscriptions","organizations_url":"https://api.github.com/users/seanmonstar/orgs","repos_url":"https://api.github.com/users/seanmonstar/repos","events_url":"https://api.github.com/users/seanmonstar/events{/privacy}","received_events_url":"https://api.github.com/users/seanmonstar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/seanmonstar/reqwest","description":null,"fork":false,"url":"https://api.github.com/repos/seanmonstar/reqwest","forks_url":"https://api.github.com/repos/seanmonstar/reqwest/forks","keys_url":"https://api.github.com/repos/seanmonstar/reqwest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seanmonstar/reqwest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seanmonstar/reqwest/teams","hooks_url":"https://api.github.com/repos/seanmonstar/reqwest/hooks","issue_events_url":"https://api.github.com/repos/seanmonstar/reqwest/issues/events{/number}","events_url":"https://api.github.com/repos/seanmonstar/reqwest/events","assignees_url":"https://api.github.com/repos/seanmonstar/reqwest/assignees{/user}","branches_url":"https://api.github.com/repos/seanmonstar/reqwest/branches{/branch}","tags_url":"https://api.github.com/repos/seanmonstar/reqwest/tags","blobs_url":"https://api.github.com/repos/seanmonstar/reqwest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seanmonstar/reqwest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seanmonstar/reqwest/git/refs{/sha}","trees_url":"https://api.github.com/repos/seanmonstar/reqwest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seanmonstar/reqwest/statuses/{sha}","languages_url":"https://api.github.com/repos/seanmonstar/reqwest/languages","stargazers_url":"https://api.github.com/repos/seanmonstar/reqwest/stargazers","contributors_url":"https://api.github.com/repos/seanmonstar/reqwest/contributors","subscribers_url":"https://api.github.com/repos/seanmonstar/reqwest/subscribers","subscription_url":"https://api.github.com/repos/seanmonstar/reqwest/subscription","commits_url":"https://api.github.com/repos/seanmonstar/reqwest/commits{/sha}","git_commits_url":"https://api.github.com/repos/seanmonstar/reqwest/git/commits{/sha}","comments_url":"https://api.github.com/repos/seanmonstar/reqwest/comments{/number}","issue_comment_url":"https://api.github.com/repos/seanmonstar/reqwest/issues/comments{/number}","contents_url":"https://api.github.com/repos/seanmonstar/reqwest/contents/{+path}","compare_url":"https://api.github.com/repos/seanmonstar/reqwest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seanmonstar/reqwest/merges","archive_url":"https://api.github.com/repos/seanmonstar/reqwest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seanmonstar/reqwest/downloads","issues_url":"https://api.github.com/repos/seanmonstar/reqwest/issues{/number}","pulls_url":"https://api.github.com/repos/seanmonstar/reqwest/pulls{/number}","milestones_url":"https://api.github.com/repos/seanmonstar/reqwest/milestones{/number}","notifications_url":"https://api.github.com/repos/seanmonstar/reqwest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seanmonstar/reqwest/labels{/name}","releases_url":"https://api.github.com/repos/seanmonstar/reqwest/releases{/id}","deployments_url":"https://api.github.com/repos/seanmonstar/reqwest/deployments","created_at":"2016-07-01T00:23:08Z","updated_at":"2017-06-08T07:55:27Z","pushed_at":"2017-06-08T16:33:36Z","git_url":"git://github.com/seanmonstar/reqwest.git","ssh_url":"git@github.com:seanmonstar/reqwest.git","clone_url":"https://github.com/seanmonstar/reqwest.git","svn_url":"https://github.com/seanmonstar/reqwest","homepage":"https://docs.rs/reqwest","size":177,"stargazers_count":256,"watchers_count":256,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":26,"forks":47,"open_issues":26,"watchers":256,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141"},"html":{"href":"https://github.com/seanmonstar/reqwest/pull/141"},"issue":{"href":"https://api.github.com/repos/seanmonstar/reqwest/issues/141"},"comments":{"href":"https://api.github.com/repos/seanmonstar/reqwest/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/seanmonstar/reqwest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seanmonstar/reqwest/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/seanmonstar/reqwest/statuses/2e5325d8f335415a74ba964c3d9f168a1a4fcdde"}}}}
{"actor":{"display_login":"seanmonstar"}}