コード例 #1
0
        public static void RegisterEndpoint(this HttpServer httpServer, GameObject gameObject, HttpMethod httpMethod, string urlPattern, string description, Action <EndpointRequestData> requestCallback)
        {
            httpServer.RegisterEndpoint(new EndpointHandler(httpMethod, urlPattern, description, requestCallback));

            RemoveEndpointOnDestroy removeEndpointOnDestroy = gameObject.AddComponent <RemoveEndpointOnDestroy>();

            removeEndpointOnDestroy.httpMethod = httpMethod;
            removeEndpointOnDestroy.urlPattern = urlPattern;
            removeEndpointOnDestroy.httpServer = httpServer;
        }
コード例 #2
0
 public static void RegisterEndpoint(this HttpServer httpServer, HttpMethod httpMethod, string urlPattern, string description, Action <EndpointRequestData> requestCallback)
 {
     httpServer.RegisterEndpoint(new EndpointHandler(httpMethod, urlPattern, description, requestCallback));
 }