{"id":7719,"date":"2015-10-19T00:57:32","date_gmt":"2015-10-19T00:57:32","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/10\/19\/android-okhttp-with-basic-authentication-open-source-projects-square-okhttp\/"},"modified":"2015-10-19T00:57:32","modified_gmt":"2015-10-19T00:57:32","slug":"android-okhttp-with-basic-authentication-open-source-projects-square-okhttp","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/10\/19\/android-okhttp-with-basic-authentication-open-source-projects-square-okhttp\/","title":{"rendered":"Android OkHttp with Basic Authentication-open source projects square\/okhttp"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/92c80ad799d0788de9ec7a4e3a26f98d?s=128&amp;d=identicon&amp;r=PG\" \/> <strong>Jesse Wilson<\/strong><\/p>\n<p>Try using OkAuthenticator:<\/p>\n<pre><code>client.setAuthenticator(new OkAuthenticator() {\n  @Override public Credential authenticate(\n      Proxy proxy, URL url, List challenges) throws IOException {\n    return Credential.basic(\"scott\", \"tiger\");\n  }\n\n  @Override public Credential authenticateProxy(\n      Proxy proxy, URL url, List challenges) throws IOException {\n    return null;\n  }\n});\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Jesse Wilson Try using OkAuthenticator: client.setAuthenticator(new OkAuthenticator() { @Override public Credential authenticate( Proxy proxy, URL url, List challenges) throws IOException { return Credential.basic(&#8220;scott&#8221;, &#8220;tiger&#8221;); } @Override public Credential authenticateProxy( Proxy proxy, URL url, List challenges) throws IOException { return null; } });<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7719","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7719"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7719\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}