在分析照片,想要用到auto-tagging时用到这个网站的API
http://docs.imagga.com/
需要使用GET传到他们的server然后在拿到他们的response
他的格式是写像这样子
![]()
GET /v1/tagging?url=
![]()
HTTP/1.1
Authorization: Basic YWNjX2R1bW15OmR1bW15X3NlY3JldF9jb2RlXzEyMzQ1Njc4OQ==
Host: api.imagga.com
我自己try了一下并且参照了stackoverflow的回答
写出了两种版本
http://pastie.org/9817324#
和
http://pastie.org/9816550#
但是在console里看都同的错误结果
error info:
XMLHttpRequest cannot load http://api.imagga.com/v1/tagging. No 'Access-Control-Allow-Origin' header is present on the requested resource
拜托各位大大解惑感谢