Skip to content

Commit 2e9c0e6

Browse files
wshAlianBlank
authored andcommitted
read code
1 parent 87dfd91 commit 2e9c0e6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

GameFrameX.NetWork.HTTP/HttpServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public static Task Start(int httpPort, int httpsPort, List<BaseHttpHandler> base
147147

148148
App.UseExceptionHandler(ExceptionHandler);
149149

150+
// 每个http处理器,注册到路由中
150151
foreach (var handler in baseHandler)
151152
{
152153
var handlerType = handler.GetType();
@@ -156,6 +157,7 @@ public static Task Start(int httpPort, int httpsPort, List<BaseHttpHandler> base
156157
continue;
157158
}
158159

160+
// 只支持POST请求
159161
var route = App.MapPost($"{ApiRootPath}{mappingAttribute.StandardCmd}", async (HttpContext context, string text) => { await HttpHandler.HandleRequest(context, httpFactory, aopHandlerTypes); });
160162
if (isDevelopment)
161163
{

0 commit comments

Comments
 (0)