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; }
public static void RegisterEndpoint(this HttpServer httpServer, HttpMethod httpMethod, string urlPattern, string description, Action <EndpointRequestData> requestCallback) { httpServer.RegisterEndpoint(new EndpointHandler(httpMethod, urlPattern, description, requestCallback)); }