HttpMethods

interface HttpMethods

提供了一组预定义的 HTTP 方法(HttpMethod)以及创建自定义方法的功能。

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun create(value: String): HttpMethod

创建一个具有指定名称的自定义 HTTP 方法。

Link copied to clipboard
abstract fun getDelete(): HttpMethod

获取 DELETE 方法,通常用于删除资源。

Link copied to clipboard
abstract fun getGet(): HttpMethod

获取 GET 方法,通常用于请求数据。

Link copied to clipboard
abstract fun getHead(): HttpMethod

获取 HEAD 方法,与 GET 类似,但服务器不返回响应体。

Link copied to clipboard
abstract fun getOptions(): HttpMethod

获取 OPTIONS 方法,用于描述目标资源的通信选项。

Link copied to clipboard
abstract fun getPatch(): HttpMethod

获取 PATCH 方法,通常用于对资源进行部分修改。

Link copied to clipboard
abstract fun getPost(): HttpMethod

获取 POST 方法,通常用于提交数据以创建资源。

Link copied to clipboard
abstract fun getPut(): HttpMethod

获取 PUT 方法,通常用于提交数据以替换或更新资源。