程序包 cool.scx.core.vo
接口 BaseVo
- 所有超级接口:
cool.scx.functional.ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>
public interface BaseVo
extends cool.scx.functional.ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>
BaseVo 接口
所有需要向前台返回数据都需要继承
- 版本:
- 0.5.0
- 作者:
- scx567888
-
方法概要
静态方法修饰符和类型方法说明static io.vertx.core.http.HttpServerResponsefillContentType(String contentType, io.vertx.core.http.HttpServerResponse response) 填充 ContentType astatic io.vertx.core.http.HttpServerResponsefillHtmlContentType(io.vertx.core.http.HttpServerResponse response) astatic io.vertx.core.http.HttpServerResponsefillJsonContentType(io.vertx.core.http.HttpServerResponse response) 填充 CONTENT_TYPE 为 json 格式static io.vertx.core.http.HttpServerResponsefillTextPlainContentType(io.vertx.core.http.HttpServerResponse response) astatic io.vertx.core.http.HttpServerResponsefillXmlContentType(io.vertx.core.http.HttpServerResponse response) 填充 CONTENT_TYPE 为 xml 格式static StringgetDownloadContentDisposition(String downloadName) todo 这是一个 hack URLEncoder.encode 针对 ' ' (空格) 会编码为 '+' , 而这里我们需要的是编码为 %20从接口继承的方法 cool.scx.functional.ScxConsumer
accept
-
方法详细资料
-
fillContentType
static io.vertx.core.http.HttpServerResponse fillContentType(String contentType, io.vertx.core.http.HttpServerResponse response) 填充 ContentType a- 参数:
contentType- aresponse- a- 返回:
- a
-
fillJsonContentType
static io.vertx.core.http.HttpServerResponse fillJsonContentType(io.vertx.core.http.HttpServerResponse response) 填充 CONTENT_TYPE 为 json 格式- 参数:
response- r- 返回:
- r
-
fillXmlContentType
static io.vertx.core.http.HttpServerResponse fillXmlContentType(io.vertx.core.http.HttpServerResponse response) 填充 CONTENT_TYPE 为 xml 格式- 参数:
response- r- 返回:
- r
-
fillHtmlContentType
static io.vertx.core.http.HttpServerResponse fillHtmlContentType(io.vertx.core.http.HttpServerResponse response) a- 参数:
response- a- 返回:
- a
-
fillTextPlainContentType
static io.vertx.core.http.HttpServerResponse fillTextPlainContentType(io.vertx.core.http.HttpServerResponse response) a- 参数:
response- a- 返回:
- a
-
getDownloadContentDisposition
todo 这是一个 hack URLEncoder.encode 针对 ' ' (空格) 会编码为 '+' , 而这里我们需要的是编码为 %20- 参数:
downloadName- aStringobject- 返回:
- c
-