Hello,
I'm attempting to use the api to add and retrieve content. Saw the
javascript code under http://www.connotea.org/wiki/WebAPIAuthentication
Basically replicated it to,
request = window.XMLHttpRequest ? new XMLHttpRequest() : new
ActiveXObject("MSXML2.XMLHTTP.3.0");
if (!request)
alert("Error initializing XMLHttpRequest!");
var url = "http://www.connotea.org/data/noop";
request.open("GET", url, true); --------------------------fails here
request.setRequestHeader("Authorization",
"Basic"+btoa(login+":"+password));
request.onreadystatechange = handleResponse;
request.send(null);
handle Response is this,
if (request.readyState == 4)
if (request.status == 200)
alert("Server is done!");
else if (request.status == 404)
alert("Request URL does not exist");
else
alert("Error: status code is " + request.status);
Now it seems like request.open only works on files on the localhost. If
that's true connotea will always return a 'permission denied to call
open()'.
Is there a way around this? The goal is to do any authentication/
response handling in the background w/o showing any of the ugly response
headers.
I expect to run into a similar issue on trying to do a post request
using HttpRequest.
Can someone help please.
Arindam Ganguly
Calit2, UCSD
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Connotea-code-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/connotea-code-devel