@Test public void testPost() throws Exception { InfoController infoController = new InfoController(); NanoHTTPD.Response response = infoController.post(null,null,null); String body = IOUtils.toString(response.getData()); assertEquals("Error, method not allowed", body); assertEquals(NanoHTTPD.Response.Status.METHOD_NOT_ALLOWED, response.getStatus()); }
@Override public NanoHTTPD.Response post(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession) { return ResponseGenerator.generateMethodNotAllowedResponse(); }
InfoController implements RouterNanoHTTPD.UriResponder { @Override public NanoHTTPD.Response post(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession) { return ResponseGenerator.generateMethodNotAllowedResponse(); } }
InfoController implements RouterNanoHTTPD.UriResponder { @Override public NanoHTTPD.Response post(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession) { return ResponseGenerator.generateMethodNotAllowedResponse(); }  }
InfoController implements RouterNanoHTTPD.UriResponder { @Override public NanoHTTPD.Response post(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession) { return ResponseGenerator.generateMethodNotAllowedResponse(); }  @Override NanoHTTPD.Response get(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response put(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response post(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response delete(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response other(String s, RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); }
InfoController implements RouterNanoHTTPD.UriResponder { @Override public NanoHTTPD.Response post(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession) { return ResponseGenerator.generateMethodNotAllowedResponse(); }  @Override NanoHTTPD.Response get(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response put(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response post(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response delete(RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession); @Override NanoHTTPD.Response other(String s, RouterNanoHTTPD.UriResource uriResource, Map<String, String> map, NanoHTTPD.IHTTPSession ihttpSession);  }