public enum ImMethod extends Enum<ImMethod>
该类限定并明确目前所支持的HTTP方法,并提供枚举选择
HTTP method enumeration class
This class defines and clarifies the currently supported HTTP methods and provides enumeration options.
program: Sinlmao Commons Network Utils
description: HTTP 方法枚举类
create: 2019-08-01 11:11
| 枚举常量和说明 |
|---|
DELETE
[DELETE] 请求服务器删除请求的URI所标识的资源,用于删除
[DELETE] Requests the server to delete the resource identified by the requested URI for deletion
|
GET
[GET] 向特定的资源发出请求,得到资源
[GET] Make a request to a specific resource to get a resource
|
HEAD
[HEAD] 与GET很像,但是不返回响应体信息,用于检查对象是否存在,并获取包含在响应消息头中的信息
[HEAD] is similar to GET, but does not return response body information, is used to check whether the object exists,
and obtain the information contained in the response message header.
|
OPTIONS
[OPTIONS] 获取服务器支持的HTTP请求方法
[OPTIONS] Get the HTTP request method supported by the server
|
PATCH
[PATCH] 是对 PUT 方法的补充,用来对已知资源进行局部更新
[PATCH] is a supplement to the PUT method for local updates to known resources
|
POST
[POST] 向指定资源提交数据进行处理的请求,用于添加新的内容
[POST] A request to submit data for processing to a specified resource for adding new content
|
PUT
[PUT] 向指定资源位置上传其最新的内容,用于修改某个内容
[PUT] Uploads its latest content to a specified resource location to modify a content
|
| 限定符和类型 | 方法和说明 |
|---|---|
static ImMethod |
fromString(String symbol) |
static ImMethod |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ImMethod[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ImMethod GET
[GET] Make a request to a specific resource to get a resource
public static final ImMethod POST
[POST] A request to submit data for processing to a specified resource for adding new content
public static final ImMethod PUT
[PUT] Uploads its latest content to a specified resource location to modify a content
public static final ImMethod DELETE
[DELETE] Requests the server to delete the resource identified by the requested URI for deletion
public static final ImMethod OPTIONS
[OPTIONS] Get the HTTP request method supported by the server
public static final ImMethod HEAD
[HEAD] is similar to GET, but does not return response body information, is used to check whether the object exists, and obtain the information contained in the response message header.
public static final ImMethod PATCH
[PATCH] is a supplement to the PUT method for local updates to known resources
public static ImMethod[] values()
for (ImMethod c : ImMethod.values()) System.out.println(c);
public static ImMethod valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值Copyright © 2020. All rights reserved.