当前位置: 首页>>代码示例>>Java>>正文


Java HttpMethod.DELETE属性代码示例

本文整理汇总了Java中org.springframework.http.HttpMethod.DELETE属性的典型用法代码示例。如果您正苦于以下问题:Java HttpMethod.DELETE属性的具体用法?Java HttpMethod.DELETE怎么用?Java HttpMethod.DELETE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.springframework.http.HttpMethod的用法示例。


在下文中一共展示了HttpMethod.DELETE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: delete

public void delete(T taskId) {
    RequestEntity<Object> request = 
            new RequestEntity<>(HttpMethod.DELETE, taskUrl(taskId));
    ResponseEntity<Object> response = 
            httpClient.exchange(request, Object.class);
    assert204(response);
}
 
开发者ID:openmicroscopy,项目名称:omero-ms-queue,代码行数:7,代码来源:TaskFileStoreClient.java

示例2: 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;
  }
}
 
开发者ID:ampool,项目名称:monarch,代码行数:33,代码来源:ClientHttpRequest.java

示例3: httpMethod

@Override
protected HttpMethod httpMethod() {
  return HttpMethod.DELETE;
}
 
开发者ID:Huawei,项目名称:Server_Management_Common_eSightApi,代码行数:4,代码来源:DestoryOpenIdProvider.java


注:本文中的org.springframework.http.HttpMethod.DELETE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。