Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 731 Bytes

method.md

File metadata and controls

37 lines (29 loc) · 731 Bytes

Method

根据请求的Method来匹配是否需要使用此路由

参数

参数 类型 是否必须 默认值 描述
methods [str] Y 方法名

配置示例

  • 简单模式

    router:
      routes:
        - id: method-shortcut
          matchers:
            - Method=GET,POST
          service: Static=examples/resources
  • 完整模式

    router:
      routes:
        - id: method-complete
          matchers:
            - kind: Method
              args:
                methods:
                  - GET
                  - POST
          service: Static=examples/resources