{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-resource/issues/439","repository_url":"https://api.github.com/repos/vuejs/vue-resource","labels_url":"https://api.github.com/repos/vuejs/vue-resource/issues/439/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-resource/issues/439/comments","events_url":"https://api.github.com/repos/vuejs/vue-resource/issues/439/events","html_url":"https://github.com/vuejs/vue-resource/issues/439","id":180903234,"number":439,"title":"Help with passing WordPress Basic Auth","user":{"login":"hyperdrivedesigns","id":18681267,"avatar_url":"https://avatars.githubusercontent.com/u/18681267?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperdrivedesigns","html_url":"https://github.com/hyperdrivedesigns","followers_url":"https://api.github.com/users/hyperdrivedesigns/followers","following_url":"https://api.github.com/users/hyperdrivedesigns/following{/other_user}","gists_url":"https://api.github.com/users/hyperdrivedesigns/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperdrivedesigns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperdrivedesigns/subscriptions","organizations_url":"https://api.github.com/users/hyperdrivedesigns/orgs","repos_url":"https://api.github.com/users/hyperdrivedesigns/repos","events_url":"https://api.github.com/users/hyperdrivedesigns/events{/privacy}","received_events_url":"https://api.github.com/users/hyperdrivedesigns/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-04T14:07:25Z","updated_at":"2016-10-06T00:39:45Z","closed_at":null,"body":"Need help with passing WordPress Basic Auth to allow for CRUD operations on posts. I have successfully coded the GET call using vue-resource. But of course, when I try to delete a post I get the 401 Unauthorized error in console. \r\n\r\nI have googled and tried many different ways to pass my headers without success. \r\n\r\nI am running vue js version: Vue.js v1.0.28\r\nVue resource version: vue-resource v0.9.3\r\n\r\nI have attached a screen shot of my console error:\r\n\r\nhere is some of my code:\r\n```javascript\r\n<script type=\"text/javascript\">\r\n\t\tVue.http.headers.common['Authorization'] = 'Basic ZHhsYWRuZXI6cGFzc3dvcmQ';\r\n\t\tvar apiURL = 'http://localhost/wpdev/wp-json/wp/v2/book/';\r\n\r\n\t\tnew Vue({\r\n\t\t  \tel: '#demoList',\r\n\t\r\n\t\t  \tdata: function() {\r\n\t\t    \treturn {\r\n\t\t\t      wpPosts: ''\r\n\t\t\t    }\r\n\t\t  \t},\r\n\r\n\t\t  \tready: function () {\r\n\t\t    \tthis.fetchPosts();\r\n\t\t  \t},\r\n\r\n\t\t  \tmethods: {\r\n\t\t    \tfetchPosts: function () {\r\n\t\t\t      this.$http.get(apiURL).then((response) => {\r\n\t\t\t        this.$set('wpPosts', response.data)\r\n\t\t\t      })\r\n\t\t\t    },\r\n\r\n\t\t    \tdeletePost: function(id) {\r\n\t\t    \t\tvar ConfirmBox = confirm('Are you sure you want to delete this post '+ id)\r\n\r\n\t\t\t\t\tif(ConfirmBox) this.$http.delete(apiURL + id)\r\n\r\n\t\t\t\t\tthis.fetchPosts()\r\n\r\n\t\t    \t},\r\n\t\t  \t}\r\n\t\t});\r\n\r\n\t</script>\r\n```\r\n<img width=\"1235\" alt=\"screen shot 2016-10-04 at 9 04 35 am\" src=\"https://cloud.githubusercontent.com/assets/18681267/19077358/f0dfd008-8a11-11e6-842a-cd3ee55bc9ff.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-resource/issues/comments/251838690","html_url":"https://github.com/vuejs/vue-resource/issues/439#issuecomment-251838690","issue_url":"https://api.github.com/repos/vuejs/vue-resource/issues/439","id":251838690,"user":{"login":"hyperdrivedesigns","id":18681267,"avatar_url":"https://avatars.githubusercontent.com/u/18681267?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperdrivedesigns","html_url":"https://github.com/hyperdrivedesigns","followers_url":"https://api.github.com/users/hyperdrivedesigns/followers","following_url":"https://api.github.com/users/hyperdrivedesigns/following{/other_user}","gists_url":"https://api.github.com/users/hyperdrivedesigns/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperdrivedesigns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperdrivedesigns/subscriptions","organizations_url":"https://api.github.com/users/hyperdrivedesigns/orgs","repos_url":"https://api.github.com/users/hyperdrivedesigns/repos","events_url":"https://api.github.com/users/hyperdrivedesigns/events{/privacy}","received_events_url":"https://api.github.com/users/hyperdrivedesigns/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T00:39:45Z","updated_at":"2016-10-06T00:39:45Z","body":"Anyone help please????"}}
{"actor":{"display_login":"hyperdrivedesigns"}}