{"action":"created","comment":{"url":"https://api.github.com/repos/podio/podio-android/pulls/comments/43730800","id":43730800,"diff_hunk":"@@ -0,0 +1,84 @@\n+/*\n+ * Copyright (C) 2015 Citrix Systems, Inc\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.podio.sdk.androidasynchttp;\n+\n+import android.content.Context;\n+\n+import com.loopj.android.http.AsyncHttpClient;\n+import com.podio.sdk.Client;\n+import com.podio.sdk.Filter;\n+import com.podio.sdk.Request;\n+import com.podio.sdk.provider.FileProvider;\n+\n+import java.io.File;\n+\n+import cz.msebera.android.httpclient.conn.ssl.SSLSocketFactory;\n+\n+/**\n+ * @author Tobias Lindberg\n+ */\n+public class AndroidAsyncHttpClient implements Client {\n+\n+    protected String scheme;\n+    protected String authority;\n+\n+    private AsyncHttpClient client;\n+    private Context context;\n+\n+    @Override\n+    public Request<Void> authenticateWithUserCredentials(String username, String password) {\n+        throw new UnsupportedOperationException(\"AndroidAsyncHttpClient only supports uploading to our Files API.\");\n+    }\n+\n+    @Override\n+    public Request<Void> authenticateWithAppCredentials(String appId, String appToken) {\n+        throw new UnsupportedOperationException(\"AndroidAsyncHttpClient only supports uploading to our Files API.\");\n+    }\n+\n+    @Override\n+    public Request<Void> authenticateWithTransferToken(String transferToken) {\n+        throw new UnsupportedOperationException(\"AndroidAsyncHttpClient only supports uploading to our Files API.\");\n+    }\n+\n+    @Override\n+    @Deprecated\n+    public Request<Void> forceRefreshTokens() {\n+        throw new UnsupportedOperationException(\"AndroidAsyncHttpClient only supports uploading to our Files API.\");\n+    }\n+\n+    @Override\n+    public <T> Request<T> request(Request.Method method, Filter filter, Object item, Class<T> classOfResult) {\n+        if (!(filter instanceof FileProvider.FileFilter) || method != Request.Method.POST || !(item instanceof File)) {","path":"sdk/src/main/java/com/podio/sdk/androidasynchttp/AndroidAsyncHttpClient.java","position":64,"original_position":64,"commit_id":"3e2c648fce4d2e92d86bc9bf019e4aaadbb745ec","original_commit_id":"3562bd097df93a7353030a543848856a19b46527","user":{"login":"tobiaselindberg","id":1694882,"avatar_url":"https://avatars.githubusercontent.com/u/1694882?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiaselindberg","html_url":"https://github.com/tobiaselindberg","followers_url":"https://api.github.com/users/tobiaselindberg/followers","following_url":"https://api.github.com/users/tobiaselindberg/following{/other_user}","gists_url":"https://api.github.com/users/tobiaselindberg/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiaselindberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiaselindberg/subscriptions","organizations_url":"https://api.github.com/users/tobiaselindberg/orgs","repos_url":"https://api.github.com/users/tobiaselindberg/repos","events_url":"https://api.github.com/users/tobiaselindberg/events{/privacy}","received_events_url":"https://api.github.com/users/tobiaselindberg/received_events","type":"User","site_admin":false},"body":"Will change that.","created_at":"2015-11-03T10:00:22Z","updated_at":"2015-11-03T10:00:22Z","html_url":"https://github.com/podio/podio-android/pull/2#discussion_r43730800","pull_request_url":"https://api.github.com/repos/podio/podio-android/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/podio/podio-android/pulls/comments/43730800"},"html":{"href":"https://github.com/podio/podio-android/pull/2#discussion_r43730800"},"pull_request":{"href":"https://api.github.com/repos/podio/podio-android/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/podio/podio-android/pulls/2","id":49288422,"html_url":"https://github.com/podio/podio-android/pull/2","diff_url":"https://github.com/podio/podio-android/pull/2.diff","patch_url":"https://github.com/podio/podio-android/pull/2.patch","issue_url":"https://api.github.com/repos/podio/podio-android/issues/2","number":2,"state":"open","locked":false,"title":"File upload using android-async-http","user":{"login":"tobiaselindberg","id":1694882,"avatar_url":"https://avatars.githubusercontent.com/u/1694882?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiaselindberg","html_url":"https://github.com/tobiaselindberg","followers_url":"https://api.github.com/users/tobiaselindberg/followers","following_url":"https://api.github.com/users/tobiaselindberg/following{/other_user}","gists_url":"https://api.github.com/users/tobiaselindberg/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiaselindberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiaselindberg/subscriptions","organizations_url":"https://api.github.com/users/tobiaselindberg/orgs","repos_url":"https://api.github.com/users/tobiaselindberg/repos","events_url":"https://api.github.com/users/tobiaselindberg/events{/privacy}","received_events_url":"https://api.github.com/users/tobiaselindberg/received_events","type":"User","site_admin":false},"body":"Added another http-client called android-async-http to handle file uploads to our API. Also added user agent to both volley and android-async-http since the sdk previously did not get our user agent injected\r\nto the sdk.","created_at":"2015-10-30T16:07:01Z","updated_at":"2015-11-03T10:00:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b634b97a111d69062d528aa8b7dd6c26bf8bc775","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/podio/podio-android/pulls/2/commits","review_comments_url":"https://api.github.com/repos/podio/podio-android/pulls/2/comments","review_comment_url":"https://api.github.com/repos/podio/podio-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/podio/podio-android/issues/2/comments","statuses_url":"https://api.github.com/repos/podio/podio-android/statuses/3e2c648fce4d2e92d86bc9bf019e4aaadbb745ec","head":{"label":"podio:fileupload","ref":"fileupload","sha":"3e2c648fce4d2e92d86bc9bf019e4aaadbb745ec","user":{"login":"podio","id":446761,"avatar_url":"https://avatars.githubusercontent.com/u/446761?v=3","gravatar_id":"","url":"https://api.github.com/users/podio","html_url":"https://github.com/podio","followers_url":"https://api.github.com/users/podio/followers","following_url":"https://api.github.com/users/podio/following{/other_user}","gists_url":"https://api.github.com/users/podio/gists{/gist_id}","starred_url":"https://api.github.com/users/podio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/podio/subscriptions","organizations_url":"https://api.github.com/users/podio/orgs","repos_url":"https://api.github.com/users/podio/repos","events_url":"https://api.github.com/users/podio/events{/privacy}","received_events_url":"https://api.github.com/users/podio/received_events","type":"Organization","site_admin":false},"repo":{"id":18321441,"name":"podio-android","full_name":"podio/podio-android","owner":{"login":"podio","id":446761,"avatar_url":"https://avatars.githubusercontent.com/u/446761?v=3","gravatar_id":"","url":"https://api.github.com/users/podio","html_url":"https://github.com/podio","followers_url":"https://api.github.com/users/podio/followers","following_url":"https://api.github.com/users/podio/following{/other_user}","gists_url":"https://api.github.com/users/podio/gists{/gist_id}","starred_url":"https://api.github.com/users/podio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/podio/subscriptions","organizations_url":"https://api.github.com/users/podio/orgs","repos_url":"https://api.github.com/users/podio/repos","events_url":"https://api.github.com/users/podio/events{/privacy}","received_events_url":"https://api.github.com/users/podio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/podio/podio-android","description":"The Android SDK for the Podio API.","fork":false,"url":"https://api.github.com/repos/podio/podio-android","forks_url":"https://api.github.com/repos/podio/podio-android/forks","keys_url":"https://api.github.com/repos/podio/podio-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/podio/podio-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/podio/podio-android/teams","hooks_url":"https://api.github.com/repos/podio/podio-android/hooks","issue_events_url":"https://api.github.com/repos/podio/podio-android/issues/events{/number}","events_url":"https://api.github.com/repos/podio/podio-android/events","assignees_url":"https://api.github.com/repos/podio/podio-android/assignees{/user}","branches_url":"https://api.github.com/repos/podio/podio-android/branches{/branch}","tags_url":"https://api.github.com/repos/podio/podio-android/tags","blobs_url":"https://api.github.com/repos/podio/podio-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/podio/podio-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/podio/podio-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/podio/podio-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/podio/podio-android/statuses/{sha}","languages_url":"https://api.github.com/repos/podio/podio-android/languages","stargazers_url":"https://api.github.com/repos/podio/podio-android/stargazers","contributors_url":"https://api.github.com/repos/podio/podio-android/contributors","subscribers_url":"https://api.github.com/repos/podio/podio-android/subscribers","subscription_url":"https://api.github.com/repos/podio/podio-android/subscription","commits_url":"https://api.github.com/repos/podio/podio-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/podio/podio-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/podio/podio-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/podio/podio-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/podio/podio-android/contents/{+path}","compare_url":"https://api.github.com/repos/podio/podio-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/podio/podio-android/merges","archive_url":"https://api.github.com/repos/podio/podio-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/podio/podio-android/downloads","issues_url":"https://api.github.com/repos/podio/podio-android/issues{/number}","pulls_url":"https://api.github.com/repos/podio/podio-android/pulls{/number}","milestones_url":"https://api.github.com/repos/podio/podio-android/milestones{/number}","notifications_url":"https://api.github.com/repos/podio/podio-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/podio/podio-android/labels{/name}","releases_url":"https://api.github.com/repos/podio/podio-android/releases{/id}","created_at":"2014-04-01T07:37:41Z","updated_at":"2015-10-28T14:35:37Z","pushed_at":"2015-11-03T09:14:42Z","git_url":"git://github.com/podio/podio-android.git","ssh_url":"git@github.com:podio/podio-android.git","clone_url":"https://github.com/podio/podio-android.git","svn_url":"https://github.com/podio/podio-android","homepage":"","size":5178,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"podio:master","ref":"master","sha":"b7de165b9406162d7278c75f70c449fc5eab2f6c","user":{"login":"podio","id":446761,"avatar_url":"https://avatars.githubusercontent.com/u/446761?v=3","gravatar_id":"","url":"https://api.github.com/users/podio","html_url":"https://github.com/podio","followers_url":"https://api.github.com/users/podio/followers","following_url":"https://api.github.com/users/podio/following{/other_user}","gists_url":"https://api.github.com/users/podio/gists{/gist_id}","starred_url":"https://api.github.com/users/podio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/podio/subscriptions","organizations_url":"https://api.github.com/users/podio/orgs","repos_url":"https://api.github.com/users/podio/repos","events_url":"https://api.github.com/users/podio/events{/privacy}","received_events_url":"https://api.github.com/users/podio/received_events","type":"Organization","site_admin":false},"repo":{"id":18321441,"name":"podio-android","full_name":"podio/podio-android","owner":{"login":"podio","id":446761,"avatar_url":"https://avatars.githubusercontent.com/u/446761?v=3","gravatar_id":"","url":"https://api.github.com/users/podio","html_url":"https://github.com/podio","followers_url":"https://api.github.com/users/podio/followers","following_url":"https://api.github.com/users/podio/following{/other_user}","gists_url":"https://api.github.com/users/podio/gists{/gist_id}","starred_url":"https://api.github.com/users/podio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/podio/subscriptions","organizations_url":"https://api.github.com/users/podio/orgs","repos_url":"https://api.github.com/users/podio/repos","events_url":"https://api.github.com/users/podio/events{/privacy}","received_events_url":"https://api.github.com/users/podio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/podio/podio-android","description":"The Android SDK for the Podio API.","fork":false,"url":"https://api.github.com/repos/podio/podio-android","forks_url":"https://api.github.com/repos/podio/podio-android/forks","keys_url":"https://api.github.com/repos/podio/podio-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/podio/podio-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/podio/podio-android/teams","hooks_url":"https://api.github.com/repos/podio/podio-android/hooks","issue_events_url":"https://api.github.com/repos/podio/podio-android/issues/events{/number}","events_url":"https://api.github.com/repos/podio/podio-android/events","assignees_url":"https://api.github.com/repos/podio/podio-android/assignees{/user}","branches_url":"https://api.github.com/repos/podio/podio-android/branches{/branch}","tags_url":"https://api.github.com/repos/podio/podio-android/tags","blobs_url":"https://api.github.com/repos/podio/podio-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/podio/podio-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/podio/podio-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/podio/podio-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/podio/podio-android/statuses/{sha}","languages_url":"https://api.github.com/repos/podio/podio-android/languages","stargazers_url":"https://api.github.com/repos/podio/podio-android/stargazers","contributors_url":"https://api.github.com/repos/podio/podio-android/contributors","subscribers_url":"https://api.github.com/repos/podio/podio-android/subscribers","subscription_url":"https://api.github.com/repos/podio/podio-android/subscription","commits_url":"https://api.github.com/repos/podio/podio-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/podio/podio-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/podio/podio-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/podio/podio-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/podio/podio-android/contents/{+path}","compare_url":"https://api.github.com/repos/podio/podio-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/podio/podio-android/merges","archive_url":"https://api.github.com/repos/podio/podio-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/podio/podio-android/downloads","issues_url":"https://api.github.com/repos/podio/podio-android/issues{/number}","pulls_url":"https://api.github.com/repos/podio/podio-android/pulls{/number}","milestones_url":"https://api.github.com/repos/podio/podio-android/milestones{/number}","notifications_url":"https://api.github.com/repos/podio/podio-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/podio/podio-android/labels{/name}","releases_url":"https://api.github.com/repos/podio/podio-android/releases{/id}","created_at":"2014-04-01T07:37:41Z","updated_at":"2015-10-28T14:35:37Z","pushed_at":"2015-11-03T09:14:42Z","git_url":"git://github.com/podio/podio-android.git","ssh_url":"git@github.com:podio/podio-android.git","clone_url":"https://github.com/podio/podio-android.git","svn_url":"https://github.com/podio/podio-android","homepage":"","size":5178,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/podio/podio-android/pulls/2"},"html":{"href":"https://github.com/podio/podio-android/pull/2"},"issue":{"href":"https://api.github.com/repos/podio/podio-android/issues/2"},"comments":{"href":"https://api.github.com/repos/podio/podio-android/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/podio/podio-android/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/podio/podio-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/podio/podio-android/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/podio/podio-android/statuses/3e2c648fce4d2e92d86bc9bf019e4aaadbb745ec"}}}}