本文整理匯總了Java中org.springframework.http.HttpMethod.HEAD屬性的典型用法代碼示例。如果您正苦於以下問題:Java HttpMethod.HEAD屬性的具體用法?Java HttpMethod.HEAD怎麽用?Java HttpMethod.HEAD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.springframework.http.HttpMethod
的用法示例。
在下文中一共展示了HttpMethod.HEAD屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getMethod
/**
* Gets the HTTP method indicating the operation to perform on the resource identified in the
* client's HTTP request. This method converts GemFire's HttpMethod enumerated value from the Link
* into a corresponding Spring HttpMethod enumerated value.
* <p/>
*
* @return a Spring HttpMethod enumerated value indicating the operation to perform on the
* resource identified in the client's HTTP request.
* @see org.apache.geode.management.internal.web.http.HttpMethod
* @see org.apache.geode.management.internal.web.domain.Link#getMethod()
* @see org.springframework.http.HttpMethod
* @see org.springframework.http.HttpRequest#getMethod()
*/
@Override
public HttpMethod getMethod() {
switch (getLink().getMethod()) {
case DELETE:
return HttpMethod.DELETE;
case HEAD:
return HttpMethod.HEAD;
case OPTIONS:
return HttpMethod.OPTIONS;
case POST:
return HttpMethod.POST;
case PUT:
return HttpMethod.PUT;
case TRACE:
return HttpMethod.TRACE;
case GET:
default:
return HttpMethod.GET;
}
}