本文整理了Java中spark.Spark.head()
方法的一些代码示例,展示了Spark.head()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spark.head()
方法的具体详情如下:
包路径:spark.Spark
类名称:Spark
方法名:head
[英]Map the route for HTTP HEAD requests
[中]映射HTTP头请求的路由
代码示例来源:origin: gocd/gocd
@Override
public void setupRoutes() {
path(controllerBasePath(), () -> {
get(Routes.PluginImages.PLUGIN_ID_HASH_PATH, this::show);
head(Routes.PluginImages.PLUGIN_ID_HASH_PATH, this::show);
});
}
代码示例来源:origin: gocd/gocd
@Override
public void setupRoutes() {
path(Routes.ServerHealthMessages.BASE, () -> {
before("", this::setContentType);
before("/*", this::setContentType);
before("", apiAuthenticationHelper::checkUserAnd403);
before("/*", apiAuthenticationHelper::checkUserAnd403);
get("", this::show);
head("", this::show);
});
}
代码示例来源:origin: gocd/gocd
@Override
public void setupRoutes() {
path(controllerBasePath(), () -> {
before("", this::setContentType);
before("/*", this::setContentType);
before("", mimeType, apiAuthenticationHelper::checkPipelineGroupOperateUserAnd403);
before("/*", mimeType, apiAuthenticationHelper::checkPipelineGroupOperateUserAnd403);
get("", this::search);
head("", this::search);
});
}
代码示例来源:origin: gocd/gocd
@Override
public void setupRoutes() {
Spark.path(controllerBasePath(), () -> {
before("", mimeType, this::setContentType);
before("/*", mimeType, this::setContentType);
before("", this::verifyContentType);
before("/*", this::verifyContentType);
before("", mimeType, apiAuthenticationHelper::checkNonAnonymousUser);
before("/*", mimeType, apiAuthenticationHelper::checkNonAnonymousUser);
get("", mimeType, this::show);
head("", mimeType, this::show);
patch("", mimeType, this::update);
});
}
代码示例来源:origin: cagataygurturk/lambadaframework
head(getSparkPath(fullPath), this::handle);
代码示例来源:origin: mgtechsoftware/smockin
Spark.head("*", (request, response) -> {
response.status(404);
return "Mock not found";
代码示例来源:origin: ikidou/Retrofit2Demo
Spark.delete("/blog/:id", BlogHandler.DELETE, GsonTransformer.getDefault());
Spark.head("/blog", BlogHandler.HEAD, GsonTransformer.getDefault());
Spark.head("/blog/:id", BlogHandler.HEAD, GsonTransformer.getDefault());
内容来源于网络,如有侵权,请联系作者删除!