{"action":"created","issue":{"url":"https://api.github.com/repos/rackspace/php-opencloud/issues/641","labels_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/641/labels{/name}","comments_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/641/comments","events_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/641/events","html_url":"https://github.com/rackspace/php-opencloud/issues/641","id":113844840,"number":641,"title":"Not possible to set metadata and HTTP headers together for Swift resources","user":{"login":"jamiehannaford","id":1867202,"avatar_url":"https://avatars.githubusercontent.com/u/1867202?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiehannaford","html_url":"https://github.com/jamiehannaford","followers_url":"https://api.github.com/users/jamiehannaford/followers","following_url":"https://api.github.com/users/jamiehannaford/following{/other_user}","gists_url":"https://api.github.com/users/jamiehannaford/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiehannaford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiehannaford/subscriptions","organizations_url":"https://api.github.com/users/jamiehannaford/orgs","repos_url":"https://api.github.com/users/jamiehannaford/repos","events_url":"https://api.github.com/users/jamiehannaford/events{/privacy}","received_events_url":"https://api.github.com/users/jamiehannaford/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rackspace/php-opencloud/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/rackspace/php-opencloud/labels/Object%20Storage","name":"Object Storage","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-28T15:15:35Z","updated_at":"2015-10-28T15:56:53Z","closed_at":null,"body":"To set HTTP headers on a Swift resource, you run:\r\n\r\n```php\r\n$this->saveMetadata(['foo' => 'bar'], false);\r\n```\r\n\r\nAnd metadata like so:\r\n\r\n```php\r\n$this->saveMetadata(['foo' => 'bar']);\r\n```\r\n\r\nwhich means they're mutually exclusive. This should not be the case."},"comment":{"url":"https://api.github.com/repos/rackspace/php-opencloud/issues/comments/151891402","html_url":"https://github.com/rackspace/php-opencloud/issues/641#issuecomment-151891402","issue_url":"https://api.github.com/repos/rackspace/php-opencloud/issues/641","id":151891402,"user":{"login":"jamiehannaford","id":1867202,"avatar_url":"https://avatars.githubusercontent.com/u/1867202?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiehannaford","html_url":"https://github.com/jamiehannaford","followers_url":"https://api.github.com/users/jamiehannaford/followers","following_url":"https://api.github.com/users/jamiehannaford/following{/other_user}","gists_url":"https://api.github.com/users/jamiehannaford/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiehannaford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiehannaford/subscriptions","organizations_url":"https://api.github.com/users/jamiehannaford/orgs","repos_url":"https://api.github.com/users/jamiehannaford/repos","events_url":"https://api.github.com/users/jamiehannaford/events{/privacy}","received_events_url":"https://api.github.com/users/jamiehannaford/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T15:56:53Z","updated_at":"2015-10-28T15:56:53Z","body":"@PatrickRose Now that I think about it, you could do something like this:\r\n\r\n```php\r\n$headers = ['X-Custom-Header' => 'foo'];\r\n$metadata = $thing::stockHeaders([\r\n   'key1' => 'val1',\r\n   'key2' => 'val2',\r\n]);\r\n\r\n$thing->saveMetadata($headers + $metadata, false);\r\n```\r\n\r\nwhere `$thing` is either account, container or object. Does that work for you?"}}