全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

请求调用示例

最近更新时间:2022-12-13 15:19:23

事件请求调用示例

  • 健康检查
  curl --location --request GET 'http://127.0.0.1:8080/health'
  • 发送Cloudevent:
curl --location --request POST 'http://127.0.0.1:8080/event-invoke' \
--header 'Content-type: application/cloudevents+json' \
--data '{
    "id": "1",
    "source": "kcs:ks3",
    "type": "ks3:ObjectCreated:PutObject",
    "specversion": "1.0",
    "datacontenttype": "application/json",
    "subject": "/",
    "comValue1": "extension value1",
    "comValue2": "extension value2",
    "data": {
        "request": {
            "sourceIPAddress": "127.0.0.1"
        },
        "response": {
            "requestId": "daab11b695ea4c4ea7a1a71ce36d1100"
        },
        "ks3": {
            "bucket": {
                "name": "kcf-pkg",
                "ownerid": "7340"
            },
            "object": {
                "internalurl": "evt-jin.ks3-cn-beijing-internal.ksyuncs.com/a.jpg",
                "etag": "etag-xxxxxxx",
                "objectsize": "1024",
                "url": "evt-jin.ks3-cn-beijing.ksyuncs.com/a.jpg",
                "key": "a.jpg"
            }
        }
    }
}'

HTTP请求调用示例

  • GET调用
curl -X POST http://127.0.0.1:8080/http-invoke
  • POST调用
curl -X POST http://127.0.0.1:80880/http-invoke
'{
 "id": "a123",
}'                          //用户自定义body内容
  • PUT调用
curl -X PUT http://127.0.0.1:8080/http-invoke
  • PATCH调用
curl -X PATCH http://127.0.0.1:8080/http-invoke
  • DELETE调用
curl -X DELETE http://127.0.0.1:8080/http-invoke
文档导读
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈