IConfig config = MConfigFactory.getInstance().toConfig(content);
return config;
}
public IConfig requestConfig(CaoElement element, String suffix, Map<String, String> post) throws Exception {
WebRequest req = new PostMethodWebRequest( app.getUri(element) + suffix );
if (post != null) {
for (Map.Entry<String, String> entry : post.entrySet())
req.setParameter(entry.getKey(), entry.getValue());
}
WebResponse res = getResponse( req );
if ( res.getResponseCode() != 200 )
return null;
String content = res.getText();