@Component public class GetHtmlMethod extends BaseMethod
参数列表
url
:
map
类型或string
类型,为空时以get方式请求,不为空时以post方式请求
map
类型
返回结果
html
:页面文本
${getHtml('https://www.publiccms.com/')}
${getHtml('https://www.publiccms.com/',"body")}
${getHtml('https://www.publiccms.com/',{"parameters1":"value1","parameters2":"value2"},{"headers1":"value1","headers2":"value2"})}
<script> $.getJSON('${site.dynamicPath}api/method/getHtml?appToken=接口访问授权Token¶meters=https://www.publiccms.com/', function(data){ console.log(data); }); </script>
log
构造器和说明 |
---|
GetHtmlMethod() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
execute(java.util.List<freemarker.template.TemplateModel> arguments) |
int |
minParametersNumber() |
boolean |
needAppToken() |
exec, execute, getBoolean, getDate, getDouble, getInteger, getIntegerArray, getLong, getLongArray, getMap, getModel, getName, getShort, getString, getStringArray, httpEnabled, setName
public java.lang.Object execute(java.util.List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException
execute
在类中 BaseMethod
freemarker.template.TemplateModelException
public boolean needAppToken()
needAppToken
在类中 BaseMethod
public int minParametersNumber()
minParametersNumber
在类中 BaseMethod