Tag: ibm watson

由于Rails / AJAX应用程序上的CORS,无法在本地访问IBM Watson API

似乎没有很多关于如何处理这个问题的答案(但很多问题),所以我要将我的名字添加到合唱中并祈祷一个不涉及Node的答案。 我的错误来自Chrome控制台: 1. POST https://gateway.watsonplatform.net/visual-recognition-beta/api 2. XMLHttpRequest cannot load https://gateway.watsonplatform.net/visual-recognition-beta/api. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:3000’ is therefore not allowed access. The response had HTTP status code 401. 我正在使用Rails AJAX请求: $.ajax({ method: “POST”, version: ‘v2-beta’, url: “https://gateway.watsonplatform.net/visual-recognition-beta/api”, password: “———–“, username: “———–“, version_date:’2015-12-02′, visual_recognition: [ { name: “visual-recognition-service”, label: “visual_recognition”, plan: […]