Tag: 分块编码

Restlet,CLAP,Ajax和块超时

我们正在使用RESTlet为我们的项目做一个小的REST服务器。 我们在从Applicationinheritance的类中build立了一堆路由: public static void createRestServer(ApplicationContext appCtx, String propertiesPath) throws Exception { // Create a component Component component = new Component(); component.getServers().add(Protocol.HTTP, 8081); component.getClients().add(Protocol.FILE); component.getClients().add(Protocol.CLAP); Context context = component.getContext().createChildContext(); RestServer application = new RestServer(context); application.getContext().getParameters().add("useForwardedForHeader", "true"); application.getContext().getAttributes().put("appCtx", appCtx); application.getContext().getAttributes().put("file", propertiesPath); // Attach the application to the component and start it component.getDefaultHost().attach(application); component.start(); } private RestServer(Context […]