Advertisement
Guest User

Untitled

a guest
Aug 6th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. XMLHttpRequest cannot load http://localhost/back/wp-json/jwt-auth/v1/token. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://imider.ma' is therefore not allowed access. The response had HTTP status code 500.
  2.  
  3. $http({
  4. method:'post',
  5. url:'',
  6. data: {
  7. username: '',
  8. password: ''
  9. }
  10. }).then(function(results){
  11. console.log(results);
  12. })
  13.  
  14. $http({
  15. method:'get',
  16. url:'',
  17. headers: { 'Authorization': 'Bearer <myTokenId>' }
  18. }).then(function(results){
  19. console.log(results);
  20. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement