We are about to switch to a new forum software. Until then we have removed the registration on this forum.
If the API I am using has security settings, is there code that can be used to override this. For example bellow the first 2 work but the third does not because of security settings. Can I code around this?
import proxml.*;
XMLInOut xmlInOut;
void setup(){
size(600, 200);
xmlInOut = new XMLInOut(this);
// xmlInOut.loadElement("http://" + "api.wefeelfine.org:8080/ShowFeelings?display=xml&returnfields=feeling,postdate,sentence&limit=50");
//xmlInOut.loadElement("http://" + "api.wefeelfine.org:8080/ShowFeelings?display=xml&returnfields=imageid,feeling,sentence,posttime,postdate,posturl,gender,born,country,state,city,lat,lon,conditions&feeling=sad&city=tokyo&limit=500&extraimages=50");
//xmlInOut.loadElement("https://" + "api.cabdirect.cab.semcs.net/select?q=dog");
xmlInOut.loadElement("http://" + "cabisearch:20100/liveCore/select?q=dog");
}
void xmlEvent(proxml.XMLElement element){
for(int i = 0; i < element.countChildren(); i++) {
println(element.getChild(i).getAttribute("name"));
println("\t"+element.getChild(i).getAttribute("name"));
}
}
Answers
http://forum.processing.org/two/discussion/8045/how-to-format-code-and-text
Ok. Let me try that again then. This API is set to a private secure setting. Can I un secure the URL in Processing by adding code to do so? https://api.cabdirect.cab.semcs.net/select?q=dog
using wget (with --no-check-certificate) i get:
so even ignoring the certificate i get a 401
Thanks for your reply. But if I could just get 1 line of code that overrides the privacy security settings on api's that would be great.
Sorry, but I was just supplying details that should've been in your original post. I'm not sure there's a fix for it - even ignoring the dodgy certificate I get asked for auth details.