{"action":"created","comment":{"url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/comments/54509923","id":54509923,"diff_hunk":"@@ -504,14 +504,14 @@ def update_object_meta(self, key, headers):\n         \"\"\"\n         return self.copy_object(self.bucket_name, key, key, headers=headers)\n \n-    def delete_object(self, key):\n+    def delete_object(self, key, headers=None):","path":"oss2/api.py","position":5,"original_position":5,"commit_id":"ec199043cbdd19734141262ab5f2298319224345","original_commit_id":"ec199043cbdd19734141262ab5f2298319224345","user":{"login":"yami","id":77224,"avatar_url":"https://avatars.githubusercontent.com/u/77224?v=3","gravatar_id":"","url":"https://api.github.com/users/yami","html_url":"https://github.com/yami","followers_url":"https://api.github.com/users/yami/followers","following_url":"https://api.github.com/users/yami/following{/other_user}","gists_url":"https://api.github.com/users/yami/gists{/gist_id}","starred_url":"https://api.github.com/users/yami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yami/subscriptions","organizations_url":"https://api.github.com/users/yami/orgs","repos_url":"https://api.github.com/users/yami/repos","events_url":"https://api.github.com/users/yami/events{/privacy}","received_events_url":"https://api.github.com/users/yami/received_events","type":"User","site_admin":false},"body":"目的是为了支持STS？如果是，接下来我会整一个完整的STS支持，不需要在每个请求里传header，而是整一个新的Auth子类出来。","created_at":"2016-03-01T01:26:58Z","updated_at":"2016-03-01T01:26:58Z","html_url":"https://github.com/aliyun/aliyun-oss-python-sdk/pull/19#discussion_r54509923","pull_request_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/comments/54509923"},"html":{"href":"https://github.com/aliyun/aliyun-oss-python-sdk/pull/19#discussion_r54509923"},"pull_request":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19","id":60133640,"html_url":"https://github.com/aliyun/aliyun-oss-python-sdk/pull/19","diff_url":"https://github.com/aliyun/aliyun-oss-python-sdk/pull/19.diff","patch_url":"https://github.com/aliyun/aliyun-oss-python-sdk/pull/19.patch","issue_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/issues/19","number":19,"state":"open","locked":false,"title":"delete object also need customized headers if user sign this request with STS token","user":{"login":"kkwezard","id":2141813,"avatar_url":"https://avatars.githubusercontent.com/u/2141813?v=3","gravatar_id":"","url":"https://api.github.com/users/kkwezard","html_url":"https://github.com/kkwezard","followers_url":"https://api.github.com/users/kkwezard/followers","following_url":"https://api.github.com/users/kkwezard/following{/other_user}","gists_url":"https://api.github.com/users/kkwezard/gists{/gist_id}","starred_url":"https://api.github.com/users/kkwezard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkwezard/subscriptions","organizations_url":"https://api.github.com/users/kkwezard/orgs","repos_url":"https://api.github.com/users/kkwezard/repos","events_url":"https://api.github.com/users/kkwezard/events{/privacy}","received_events_url":"https://api.github.com/users/kkwezard/received_events","type":"User","site_admin":false},"body":"I tried to delete an OSS object via the official SDK but the delete_object API doesn't allow me to set headers. However if I sign this request using STS granted temporary token, I have to set x-oss-security-token in HTTP header manually. The current API didn't expose this parameter to me.","created_at":"2016-02-22T07:14:14Z","updated_at":"2016-03-01T01:26:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b1a9b40de5b69b93ab8a6ba4ee89808500c1816","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19/commits","review_comments_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19/comments","review_comment_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/issues/19/comments","statuses_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/statuses/ec199043cbdd19734141262ab5f2298319224345","head":{"label":"kkwezard:master","ref":"master","sha":"ec199043cbdd19734141262ab5f2298319224345","user":{"login":"kkwezard","id":2141813,"avatar_url":"https://avatars.githubusercontent.com/u/2141813?v=3","gravatar_id":"","url":"https://api.github.com/users/kkwezard","html_url":"https://github.com/kkwezard","followers_url":"https://api.github.com/users/kkwezard/followers","following_url":"https://api.github.com/users/kkwezard/following{/other_user}","gists_url":"https://api.github.com/users/kkwezard/gists{/gist_id}","starred_url":"https://api.github.com/users/kkwezard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkwezard/subscriptions","organizations_url":"https://api.github.com/users/kkwezard/orgs","repos_url":"https://api.github.com/users/kkwezard/repos","events_url":"https://api.github.com/users/kkwezard/events{/privacy}","received_events_url":"https://api.github.com/users/kkwezard/received_events","type":"User","site_admin":false},"repo":{"id":49633741,"name":"aliyun-oss-python-sdk","full_name":"kkwezard/aliyun-oss-python-sdk","owner":{"login":"kkwezard","id":2141813,"avatar_url":"https://avatars.githubusercontent.com/u/2141813?v=3","gravatar_id":"","url":"https://api.github.com/users/kkwezard","html_url":"https://github.com/kkwezard","followers_url":"https://api.github.com/users/kkwezard/followers","following_url":"https://api.github.com/users/kkwezard/following{/other_user}","gists_url":"https://api.github.com/users/kkwezard/gists{/gist_id}","starred_url":"https://api.github.com/users/kkwezard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkwezard/subscriptions","organizations_url":"https://api.github.com/users/kkwezard/orgs","repos_url":"https://api.github.com/users/kkwezard/repos","events_url":"https://api.github.com/users/kkwezard/events{/privacy}","received_events_url":"https://api.github.com/users/kkwezard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kkwezard/aliyun-oss-python-sdk","description":"","fork":true,"url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk","forks_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/forks","keys_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/teams","hooks_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/hooks","issue_events_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/events","assignees_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/tags","blobs_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/languages","stargazers_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/stargazers","contributors_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/contributors","subscribers_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/subscribers","subscription_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/subscription","commits_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/merges","archive_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/downloads","issues_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/labels{/name}","releases_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/kkwezard/aliyun-oss-python-sdk/deployments","created_at":"2016-01-14T08:34:12Z","updated_at":"2016-01-14T08:34:13Z","pushed_at":"2016-02-22T07:06:35Z","git_url":"git://github.com/kkwezard/aliyun-oss-python-sdk.git","ssh_url":"git@github.com:kkwezard/aliyun-oss-python-sdk.git","clone_url":"https://github.com/kkwezard/aliyun-oss-python-sdk.git","svn_url":"https://github.com/kkwezard/aliyun-oss-python-sdk","homepage":null,"size":229,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aliyun:master","ref":"master","sha":"1c839e5f9a22201bf6ad8c3ceb1f4ff69f496c10","user":{"login":"aliyun","id":941070,"avatar_url":"https://avatars.githubusercontent.com/u/941070?v=3","gravatar_id":"","url":"https://api.github.com/users/aliyun","html_url":"https://github.com/aliyun","followers_url":"https://api.github.com/users/aliyun/followers","following_url":"https://api.github.com/users/aliyun/following{/other_user}","gists_url":"https://api.github.com/users/aliyun/gists{/gist_id}","starred_url":"https://api.github.com/users/aliyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliyun/subscriptions","organizations_url":"https://api.github.com/users/aliyun/orgs","repos_url":"https://api.github.com/users/aliyun/repos","events_url":"https://api.github.com/users/aliyun/events{/privacy}","received_events_url":"https://api.github.com/users/aliyun/received_events","type":"Organization","site_admin":false},"repo":{"id":47454460,"name":"aliyun-oss-python-sdk","full_name":"aliyun/aliyun-oss-python-sdk","owner":{"login":"aliyun","id":941070,"avatar_url":"https://avatars.githubusercontent.com/u/941070?v=3","gravatar_id":"","url":"https://api.github.com/users/aliyun","html_url":"https://github.com/aliyun","followers_url":"https://api.github.com/users/aliyun/followers","following_url":"https://api.github.com/users/aliyun/following{/other_user}","gists_url":"https://api.github.com/users/aliyun/gists{/gist_id}","starred_url":"https://api.github.com/users/aliyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliyun/subscriptions","organizations_url":"https://api.github.com/users/aliyun/orgs","repos_url":"https://api.github.com/users/aliyun/repos","events_url":"https://api.github.com/users/aliyun/events{/privacy}","received_events_url":"https://api.github.com/users/aliyun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aliyun/aliyun-oss-python-sdk","description":"","fork":false,"url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk","forks_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/forks","keys_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/teams","hooks_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/hooks","issue_events_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/events","assignees_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/tags","blobs_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/languages","stargazers_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/stargazers","contributors_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/contributors","subscribers_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/subscribers","subscription_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/subscription","commits_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/merges","archive_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/downloads","issues_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/labels{/name}","releases_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/deployments","created_at":"2015-12-05T12:09:57Z","updated_at":"2016-02-22T09:19:50Z","pushed_at":"2016-02-22T07:14:14Z","git_url":"git://github.com/aliyun/aliyun-oss-python-sdk.git","ssh_url":"git@github.com:aliyun/aliyun-oss-python-sdk.git","clone_url":"https://github.com/aliyun/aliyun-oss-python-sdk.git","svn_url":"https://github.com/aliyun/aliyun-oss-python-sdk","homepage":null,"size":238,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19"},"html":{"href":"https://github.com/aliyun/aliyun-oss-python-sdk/pull/19"},"issue":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/issues/19"},"comments":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/aliyun/aliyun-oss-python-sdk/statuses/ec199043cbdd19734141262ab5f2298319224345"}}}}