本文整理了Java中ro.pippo.core.Response.notFound
方法的一些代码示例,展示了Response.notFound
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.notFound
方法的具体详情如下:
包路径:ro.pippo.core.Response
类名称:Response
方法名:notFound
[英]Set the response status to NOT FOUND (404).
The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.
[中]将响应状态设置为未找到(404)。
无法找到请求的资源,但将来可能会再次可用。客户的后续请求是允许的。
代码示例来源:origin: pippo-java/pippo
if (response.getStatus() == 0) {
log.debug("Status code not set for {} '{}'", requestMethod, requestPath);
response.notFound();
代码示例来源:origin: pippo-java/pippo
routeContext.getResponse().notFound();
} else {
代码示例来源:origin: gitblit/fathom
protected void serveSpecification(RouteContext ctx, String specificationName) {
String extension = Files.getFileExtension(specificationName);
if (extension.isEmpty()) {
// default to json
specificationName += ".json";
}
final String finalDocumentName = specificationName;
final String finalExtension = Files.getFileExtension(finalDocumentName);
String document = specifications.get(finalDocumentName.toLowerCase());
if (document == null) {
ctx.getResponse().notFound();
} else {
ctx.getResponse().ok();
httpCacheToolkit.addEtag(ctx, startTime);
if ("json".equals(finalExtension)) {
ctx.json();
} else if ("yaml".equals(finalExtension)) {
ctx.yaml();
} else {
ctx.text();
}
if (HttpMethod.GET.equals(ctx.getRequestMethod())) {
ctx.getResponse().send(document);
}
}
}
代码示例来源:origin: com.gitblit.fathom/fathom-rest-swagger
protected void serveSpecification(RouteContext ctx, String specificationName) {
String extension = Files.getFileExtension(specificationName);
if (extension.isEmpty()) {
// default to json
specificationName += ".json";
}
final String finalDocumentName = specificationName;
final String finalExtension = Files.getFileExtension(finalDocumentName);
String document = specifications.get(finalDocumentName.toLowerCase());
if (document == null) {
ctx.getResponse().notFound();
} else {
ctx.getResponse().ok();
httpCacheToolkit.addEtag(ctx, startTime);
if ("json".equals(finalExtension)) {
ctx.json();
} else if ("yaml".equals(finalExtension)) {
ctx.yaml();
} else {
ctx.text();
}
if (HttpMethod.GET.equals(ctx.getRequestMethod())) {
ctx.getResponse().send(document);
}
}
}
代码示例来源:origin: ro.pippo/pippo-controller
routeContext.getResponse().notFound();
} else {
代码示例来源:origin: com.gitblit.fathom/fathom-rest
context.getResponse().notFound();
代码示例来源:origin: gitblit/fathom
context.getResponse().notFound();
内容来源于网络,如有侵权,请联系作者删除!