{"action":"created","issue":{"url":"https://api.github.com/repos/square/okhttp/issues/2269","labels_url":"https://api.github.com/repos/square/okhttp/issues/2269/labels{/name}","comments_url":"https://api.github.com/repos/square/okhttp/issues/2269/comments","events_url":"https://api.github.com/repos/square/okhttp/issues/2269/events","html_url":"https://github.com/square/okhttp/issues/2269","id":127993288,"number":2269,"title":"Provide a finer grained way to disallow cleartext traffic","user":{"login":"chadbrubaker","id":9422938,"avatar_url":"https://avatars.githubusercontent.com/u/9422938?v=3","gravatar_id":"","url":"https://api.github.com/users/chadbrubaker","html_url":"https://github.com/chadbrubaker","followers_url":"https://api.github.com/users/chadbrubaker/followers","following_url":"https://api.github.com/users/chadbrubaker/following{/other_user}","gists_url":"https://api.github.com/users/chadbrubaker/gists{/gist_id}","starred_url":"https://api.github.com/users/chadbrubaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadbrubaker/subscriptions","organizations_url":"https://api.github.com/users/chadbrubaker/orgs","repos_url":"https://api.github.com/users/chadbrubaker/repos","events_url":"https://api.github.com/users/chadbrubaker/events{/privacy}","received_events_url":"https://api.github.com/users/chadbrubaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-21T18:46:14Z","updated_at":"2016-01-21T21:45:08Z","closed_at":null,"body":"As a follow up to #1058 we've found in deploying the cleartext traffic opt-out that the all or nothing nature of the current approach is too coarse grained to be enabled in many applications. For example the most common issue we run into is that a developer wants to disallow cleartext traffic to their secure domains while still being able to connect to arbitrary external non-sensitive URLs in cleartext.\r\n\r\nIt would be great if there was a way to approve cleartext traffic at a hostname level. This could take the form of a callback, perhaps a more generic checkRequestPermitted(Url destination, String method) throws ... which could be used for other types of filtering?\r\n\r\nI'm happy to provide a patch if the approach sounds sensible.\r\n"},"comment":{"url":"https://api.github.com/repos/square/okhttp/issues/comments/173718990","html_url":"https://github.com/square/okhttp/issues/2269#issuecomment-173718990","issue_url":"https://api.github.com/repos/square/okhttp/issues/2269","id":173718990,"user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T21:45:08Z","updated_at":"2016-01-21T21:45:08Z","body":"@chadbrubaker today is the day to upgrade to OkHttp’s Request/Response API. You won’t regret it!"}}