{"action":"created","issue":{"url":"https://api.github.com/repos/go-resty/resty/issues/169","repository_url":"https://api.github.com/repos/go-resty/resty","labels_url":"https://api.github.com/repos/go-resty/resty/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/go-resty/resty/issues/169/comments","events_url":"https://api.github.com/repos/go-resty/resty/issues/169/events","html_url":"https://github.com/go-resty/resty/issues/169","id":345487746,"node_id":"MDU6SXNzdWUzNDU0ODc3NDY=","number":169,"title":"Response.IsSuccess proposal","user":{"login":"mxpv","id":865334,"node_id":"MDQ6VXNlcjg2NTMzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/865334?v=4","gravatar_id":"","url":"https://api.github.com/users/mxpv","html_url":"https://github.com/mxpv","followers_url":"https://api.github.com/users/mxpv/followers","following_url":"https://api.github.com/users/mxpv/following{/other_user}","gists_url":"https://api.github.com/users/mxpv/gists{/gist_id}","starred_url":"https://api.github.com/users/mxpv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxpv/subscriptions","organizations_url":"https://api.github.com/users/mxpv/orgs","repos_url":"https://api.github.com/users/mxpv/repos","events_url":"https://api.github.com/users/mxpv/events{/privacy}","received_events_url":"https://api.github.com/users/mxpv/received_events","type":"User","site_admin":false},"labels":[{"id":253847034,"node_id":"MDU6TGFiZWwyNTM4NDcwMzQ=","url":"https://api.github.com/repos/go-resty/resty/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"jeevatkm","id":1175977,"node_id":"MDQ6VXNlcjExNzU5Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1175977?v=4","gravatar_id":"","url":"https://api.github.com/users/jeevatkm","html_url":"https://github.com/jeevatkm","followers_url":"https://api.github.com/users/jeevatkm/followers","following_url":"https://api.github.com/users/jeevatkm/following{/other_user}","gists_url":"https://api.github.com/users/jeevatkm/gists{/gist_id}","starred_url":"https://api.github.com/users/jeevatkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeevatkm/subscriptions","organizations_url":"https://api.github.com/users/jeevatkm/orgs","repos_url":"https://api.github.com/users/jeevatkm/repos","events_url":"https://api.github.com/users/jeevatkm/events{/privacy}","received_events_url":"https://api.github.com/users/jeevatkm/received_events","type":"User","site_admin":false},"assignees":[{"login":"jeevatkm","id":1175977,"node_id":"MDQ6VXNlcjExNzU5Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1175977?v=4","gravatar_id":"","url":"https://api.github.com/users/jeevatkm","html_url":"https://github.com/jeevatkm","followers_url":"https://api.github.com/users/jeevatkm/followers","following_url":"https://api.github.com/users/jeevatkm/following{/other_user}","gists_url":"https://api.github.com/users/jeevatkm/gists{/gist_id}","starred_url":"https://api.github.com/users/jeevatkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeevatkm/subscriptions","organizations_url":"https://api.github.com/users/jeevatkm/orgs","repos_url":"https://api.github.com/users/jeevatkm/repos","events_url":"https://api.github.com/users/jeevatkm/events{/privacy}","received_events_url":"https://api.github.com/users/jeevatkm/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/go-resty/resty/milestones/22","html_url":"https://github.com/go-resty/resty/milestone/22","labels_url":"https://api.github.com/repos/go-resty/resty/milestones/22/labels","id":3529805,"node_id":"MDk6TWlsZXN0b25lMzUyOTgwNQ==","number":22,"title":"v1.8 Milestone","description":"","creator":{"login":"jeevatkm","id":1175977,"node_id":"MDQ6VXNlcjExNzU5Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1175977?v=4","gravatar_id":"","url":"https://api.github.com/users/jeevatkm","html_url":"https://github.com/jeevatkm","followers_url":"https://api.github.com/users/jeevatkm/followers","following_url":"https://api.github.com/users/jeevatkm/following{/other_user}","gists_url":"https://api.github.com/users/jeevatkm/gists{/gist_id}","starred_url":"https://api.github.com/users/jeevatkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeevatkm/subscriptions","organizations_url":"https://api.github.com/users/jeevatkm/orgs","repos_url":"https://api.github.com/users/jeevatkm/repos","events_url":"https://api.github.com/users/jeevatkm/events{/privacy}","received_events_url":"https://api.github.com/users/jeevatkm/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2018-07-29T00:53:02Z","updated_at":"2018-07-29T01:10:35Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-07-28T23:49:07Z","updated_at":"2018-07-29T01:10:35Z","closed_at":"2018-07-29T01:10:35Z","author_association":"NONE","body":"Hey.\r\n\r\nI have an API which returns body in case of success or 4xx/5xx and error status text in case of error.\r\nIt would be nice to add `IsSuccess` helper, something like:\r\n```\r\n\tif resp.IsSuccess() {\r\n\t\treturn nil, errors.New(resp.Status())\r\n\t} else {\r\n\t\treturn resp Body\r\n\t}\r\n```\r\n\r\nThis is very similar `IsSuccessStatusCode` in https://stackoverflow.com/questions/32569860/checking-if-httpstatuscode-represents-success-or-failure\r\n\r\nThe implementation is trivial:\r\n```\r\nreturn statusCode >= 200 && statusCode <= 299;\r\n```\r\n\r\nWhat do you think?\r\nThanks."},"comment":{"url":"https://api.github.com/repos/go-resty/resty/issues/comments/408644949","html_url":"https://github.com/go-resty/resty/issues/169#issuecomment-408644949","issue_url":"https://api.github.com/repos/go-resty/resty/issues/169","id":408644949,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODY0NDk0OQ==","user":{"login":"mxpv","id":865334,"node_id":"MDQ6VXNlcjg2NTMzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/865334?v=4","gravatar_id":"","url":"https://api.github.com/users/mxpv","html_url":"https://github.com/mxpv","followers_url":"https://api.github.com/users/mxpv/followers","following_url":"https://api.github.com/users/mxpv/following{/other_user}","gists_url":"https://api.github.com/users/mxpv/gists{/gist_id}","starred_url":"https://api.github.com/users/mxpv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxpv/subscriptions","organizations_url":"https://api.github.com/users/mxpv/orgs","repos_url":"https://api.github.com/users/mxpv/repos","events_url":"https://api.github.com/users/mxpv/events{/privacy}","received_events_url":"https://api.github.com/users/mxpv/received_events","type":"User","site_admin":false},"created_at":"2018-07-29T01:10:35Z","updated_at":"2018-07-29T01:10:35Z","author_association":"NONE","body":"@jeevatkm thanks a lot!"}}
{"actor":{"display_login":"mxpv"}}