use of lucee.commons.io.res.type.http.HTTPResource in project Lucee by lucee.
the class Feed method doStartTag.
@Override
public int doStartTag() throws PageException {
if (source instanceof HTTPResource) {
HTTPResource httpSource = (HTTPResource) source;
if (!StringUtil.isEmpty(proxyServer, true)) {
ProxyData data = new ProxyDataImpl(proxyServer, proxyPort, proxyUser, proxyPassword);
httpSource.setProxyData(data);
}
if (!StringUtil.isEmpty(userAgent))
httpSource.setUserAgent(userAgent);
if (timeout > -1)
httpSource.setTimeout(timeout * 1000);
}
try {
if (ACTION_CREATE == action)
doActionCreate();
else if (ACTION_READ == action)
doActionRead();
} catch (Exception e) {
throw Caster.toPageException(e);
}
return SKIP_BODY;
}
Aggregations