HI I have deployed the iodocs locally,and its working for the samples given. but for my api its giving empty response.

here is what i appended to /data/apiconfig.json

"cloudspokes": {
    "name": "cloudspokes",
    "protocol": "http",
    "baseURL": "cloudspokes.com",
    "publicPath": "",
    "auth": ""
} 

and here is /data/cloudspokes.json

{
"endpoints":[
  {
     "name":"Challenges",
     "methods":[
        {
           "MethodName":"challenges",
           "Synopsis":"This method returns a list of challenges.",
           "HTTPMethod":"GET",
           "URI":"/challenges.json",
           "RequiresOAuth":"N",
           "parameters":[

            ]
        }

      ]
  }

 ]
}

iodocs is rendering the interface correctly enter image description here

also going to http://cloudspokes.com/challenges.json returns non empty response. I am new to this , please help .

有帮助吗?

解决方案

The quick fix is to update your apiconfig.json block for cloudspokes to look like this:

"cloudspokes": {
    "name": "cloudspokes",
    "protocol": "http",
    "baseURL": "www.cloudspokes.com",
    "publicPath": "",
    "auth": ""
} 

The difference is that I added the "www." prefix to the baseURL hostname. How did I know you needed this? Because I turned on debugging and saw that it was throwing a 301 (redirect). Check the config.json file and change debug to be true and you'll see the same thing.

But again, quick fix, just add www. to the baseURL, and you're all set.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top