mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-16 00:15:42 +00:00
test[http]: http server的使用示例
This commit is contained in:
1 parent
67a7279f58
commit
9c79ef74db
1 file changed
+1
-1
@@ -48,7 +48,7 @@ public class HttpServerTest {
|
|||||||
public DecodedPacketInfo apply(FullHttpRequest fullHttpRequest) {
|
public DecodedPacketInfo apply(FullHttpRequest fullHttpRequest) {
|
||||||
var uri = StringUtils.trim(fullHttpRequest.uri());
|
var uri = StringUtils.trim(fullHttpRequest.uri());
|
||||||
if (uri.equals("/hello")) {
|
if (uri.equals("/hello")) {
|
||||||
return DecodedPacketInfo.valueOf(HttpHelloRequest.valueOf("aaa"), HttpAttachment.valueOf(fullHttpRequest, null));
|
return DecodedPacketInfo.valueOf(HttpHelloRequest.valueOf("other param"), HttpAttachment.valueOf(fullHttpRequest, null));
|
||||||
} else {
|
} else {
|
||||||
throw new RunException("未知的http路径[{}]", uri);
|
throw new RunException("未知的http路径[{}]", uri);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user