mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-24 14:26:33 +00:00
test[http]: http server的使用示例
This commit is contained in:
@@ -48,7 +48,7 @@ public class HttpServerTest {
|
||||
public DecodedPacketInfo apply(FullHttpRequest fullHttpRequest) {
|
||||
var uri = StringUtils.trim(fullHttpRequest.uri());
|
||||
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 {
|
||||
throw new RunException("未知的http路径[{}]", uri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user