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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.