-
Notifications
You must be signed in to change notification settings - Fork 9
/
web.yaml
63 lines (61 loc) · 2.5 KB
/
web.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
drivers:
daemon:
features:
operator:
- name: "driver:web"
drivers:
web:
name: web
type: builtin
handlerData:
shortName: web
description: This driver enables Honeydipper to make outbound web requests
meta:
rawActions:
- name: request
description: making an outbound web request
parameters:
- name: URL
description: The target url for the outbound web request
- name: header
description: A list of k/v pair as headers for the web request
- name: method
description: The method for the web request
- name: content
description: Form data, post data or the data structure encoded as json for application/json content-type
returns:
- name: status_code
description: HTTP status code
- name: cookies
description: A list of k/v pair as cookies received from the web server
- name: headers
description: A list of k/v pair as headers received from the web server
- name: body
description: a string contains all response body
- name: json
description: if the return is json content type, this will be parsed json data blob
notes:
- See below for a simple example
- example:
workflows:
sending_request:
call_driver: web.request
with:
URL: https://ifconfig.co
- Below is an example of specifying header for the outbound request defined through a system function
- example:
systems:
my_api_server:
data:
url: https://foo.bar/api
token: ENC[gcloud-kms,...masked...]
function:
secured_api:
driver: web
rawAction: request
parameters:
URL: $sysData.url
header:
content-type: application/json; charset=utf-8
Authorization: Bearer {{ .sysData.token }}