class HttpMethod
cangjie
public abstract class HttpMethod <: IActionHttpMethodProvider & IRouteTemplateProvider功能:为动作提供 HTTP 方法和路由模板元数据。
父类型:
成员概览
| 成员 | 功能 |
|---|---|
| init(String) | 使用 HTTP 方法初始化元数据。 |
| init(String, String) | 使用 HTTP 方法和模板初始化元数据。 |
| prop template | 返回附加的路由模板。 |
| prop httpMethods | 返回动作支持的 HTTP 方法集合。 |
init(String)
cangjie
public const init(httpMethods: String)功能:使用 HTTP 方法初始化元数据。
参数:
- httpMethods:
String- 要绑定的 HTTP 方法名称。
init(String, String)
cangjie
public const init(httpMethods: String, template: String)功能:使用 HTTP 方法和模板初始化元数据。
参数:
- httpMethods:
String- 要绑定的 HTTP 方法名称。 - template:
String- 要附加的路由模板。
prop template
cangjie
public prop template: ?String功能:返回附加的路由模板。
类型:?String
prop httpMethods
cangjie
public prop httpMethods: Array<String>功能:返回动作支持的 HTTP 方法集合。
类型:Array<String>