Package cool.scx.web.parameter_handler
Class RequestInfo
java.lang.Object
cool.scx.web.parameter_handler.RequestInfo
封装 RoutingContext 的参数 防止反复取值造成性能损失
- Version:
- 1.4.7
- Author:
- scx567888
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodebody()static com.fasterxml.jackson.databind.JsonNodeinitBody(io.vertx.ext.web.RoutingContext ctx, RequestInfo.ContentType contentType) 根据不同的 ContentType 以不同的逻辑初始化 bodystatic RequestInfo.ContentTypeinitContentType(io.vertx.ext.web.RoutingContext ctx) static com.fasterxml.jackson.databind.JsonNodestatic com.fasterxml.jackson.databind.JsonNodeio.vertx.ext.web.RoutingContextstatic com.fasterxml.jackson.databind.JsonNodetryReadOrTextNode(String str) 走到这里标识以上的匹配全部失败 , 这里不知道 body 的具体格式 所以进行猜测转换
-
Constructor Details
-
RequestInfo
public RequestInfo(io.vertx.ext.web.RoutingContext ctx)
-
-
Method Details
-
initBody
public static com.fasterxml.jackson.databind.JsonNode initBody(io.vertx.ext.web.RoutingContext ctx, RequestInfo.ContentType contentType) 根据不同的 ContentType 以不同的逻辑初始化 body- Parameters:
ctx- ctxcontentType- a- Returns:
- c a
-
readJson
-
readXml
-
tryReadOrTextNode
走到这里标识以上的匹配全部失败 , 这里不知道 body 的具体格式 所以进行猜测转换- Parameters:
str- a- Returns:
- a
-
initContentType
-
body
public com.fasterxml.jackson.databind.JsonNode body() -
contentType
-
routingContext
public io.vertx.ext.web.RoutingContext routingContext()
-