public final class HttpUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static HttpResult |
get(String hostUrl) |
static HttpResult |
get(String hostUrl,
ConstraintMap<String> param) |
static String |
map2QueryParam(ConstraintMap<String> map) |
static HttpResult |
post(String hostUrl,
ConstraintMap<String> param,
HashMap<String,String> requestProperty) |
static ConstraintMap<String> |
queryParam2Map(String queryParam) |
static void |
sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
ContentTypes contentType,
byte[] bytes,
boolean isClose) |
static void |
sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
ContentTypes contentType,
io.netty.buffer.ByteBuf result,
boolean isClose) |
static void |
sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
String result) |
static void |
sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
String result,
boolean isClose) |
static void |
sendResponseError(io.netty.channel.Channel channel,
RequestErrorCode errorCode) |
static void |
sendResponseError(io.netty.channel.Channel channel,
RequestErrorCode errorCode,
String others) |
public static HttpResult post(String hostUrl, ConstraintMap<String> param, HashMap<String,String> requestProperty) throws IOException
IOExceptionpublic static HttpResult get(String hostUrl) throws IOException
IOExceptionpublic static HttpResult get(String hostUrl, ConstraintMap<String> param) throws IOException
IOExceptionpublic static void sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
String result,
boolean isClose)
public static void sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
ContentTypes contentType,
byte[] bytes,
boolean isClose)
public static void sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
ContentTypes contentType,
io.netty.buffer.ByteBuf result,
boolean isClose)
public static void sendResponse(io.netty.channel.Channel channel,
io.netty.handler.codec.http.HttpResponseStatus resultCode,
String result)
public static void sendResponseError(io.netty.channel.Channel channel,
RequestErrorCode errorCode,
String others)
public static void sendResponseError(io.netty.channel.Channel channel,
RequestErrorCode errorCode)
public static String map2QueryParam(ConstraintMap<String> map)
public static ConstraintMap<String> queryParam2Map(String queryParam) throws Exception
ExceptionCopyright © 2017. All rights reserved.