{"action":"created","issue":{"url":"https://api.github.com/repos/yegor256/takes/issues/298","labels_url":"https://api.github.com/repos/yegor256/takes/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/yegor256/takes/issues/298/comments","events_url":"https://api.github.com/repos/yegor256/takes/issues/298/events","html_url":"https://github.com/yegor256/takes/issues/298","id":77573899,"number":298,"title":"RsWithType overrides status code","user":{"login":"komaz","id":481692,"avatar_url":"https://avatars.githubusercontent.com/u/481692?v=3","gravatar_id":"","url":"https://api.github.com/users/komaz","html_url":"https://github.com/komaz","followers_url":"https://api.github.com/users/komaz/followers","following_url":"https://api.github.com/users/komaz/following{/other_user}","gists_url":"https://api.github.com/users/komaz/gists{/gist_id}","starred_url":"https://api.github.com/users/komaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komaz/subscriptions","organizations_url":"https://api.github.com/users/komaz/orgs","repos_url":"https://api.github.com/users/komaz/repos","events_url":"https://api.github.com/users/komaz/events{/privacy}","received_events_url":"https://api.github.com/users/komaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T09:13:48Z","updated_at":"2015-05-18T09:19:39Z","closed_at":null,"body":"`RsWithType` wraps given response into `RsWithStatus` internally, hence overriding an existing status (if set). Here's modified snippet from `org.takes.Response` javadoc (I just did a seemingly safe replacement from `RsWithHeader` to `RsWithType`):\r\n```java\r\nfinal Response response = new RsWithType(\r\n   new RsWithBody(\r\n     new RsWithStatus(500),\r\n     \"hello, world!\"\r\n   ),\r\n   \"text/html\"\r\n );\r\n```\r\nAs a result, the response status will be 200, not 500.\r\n\r\nThis as well affects `RsText(Response)` ctor – besides just setting content type to `text/plain`, it changes response code to 200."},"comment":{"url":"https://api.github.com/repos/yegor256/takes/issues/comments/102988109","html_url":"https://github.com/yegor256/takes/issues/298#issuecomment-102988109","issue_url":"https://api.github.com/repos/yegor256/takes/issues/298","id":102988109,"user":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T09:19:39Z","updated_at":"2015-05-18T09:19:39Z","body":"@davvd this is definitely a bug"}}