AnsweredAssumed Answered

Using SimpleHttpConnection from Webscripts

Question asked by jon81 on Jul 10, 2012
Latest reply on Jul 10, 2012 by jon81
I am trying to use SimpleHttpConnection to retrieve content (from a remote server) in a webscript and write it to a content node.

my code looks like:

simplehttpresult = SimpleHttpConnection.getContent(url);
content.properties.content.write(simplehttpresult);

The error I get in the logs is:

Error: InternalError: Can't find method org.alfresco.repo.jscript.ScriptNode$ScriptContentData.write(java.lang.String).


So I guess my question is, how do I caste a String to a ScriptContent object (or whatever format it needs to be in)?

Outcomes