Created
January 29, 2020 13:57
-
-
Save TobiasRoland/c85fcb663280b9024980bb97c4b8edcc to your computer and use it in GitHub Desktop.
Example of request recieved in GCP cloud functions from a slack slash command (as deserialized by npm dependency "safe-json-stringify" due to circular nature of object)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_readableState": { | |
"objectMode": false, | |
"highWaterMark": 16384, | |
"buffer": { | |
"head": null, | |
"tail": null, | |
"length": 0 | |
}, | |
"length": 0, | |
"pipes": null, | |
"pipesCount": 0, | |
"flowing": true, | |
"ended": true, | |
"endEmitted": true, | |
"reading": false, | |
"sync": false, | |
"needReadable": false, | |
"emittedReadable": false, | |
"readableListening": false, | |
"resumeScheduled": false, | |
"destroyed": false, | |
"defaultEncoding": "utf8", | |
"awaitDrain": 0, | |
"readingMore": false, | |
"decoder": null, | |
"encoding": null | |
}, | |
"readable": false, | |
"domain": null, | |
"_events": {}, | |
"_eventsCount": 1, | |
"socket": { | |
"connecting": false, | |
"_hadError": false, | |
"_handle": { | |
"reading": true, | |
"owner": "[Circular]", | |
"onconnection": null, | |
"writeQueueSize": 0, | |
"_consumed": true | |
}, | |
"_parent": null, | |
"_host": null, | |
"_readableState": { | |
"objectMode": false, | |
"highWaterMark": 16384, | |
"buffer": { | |
"head": null, | |
"tail": null, | |
"length": 0 | |
}, | |
"length": 0, | |
"pipes": null, | |
"pipesCount": 0, | |
"flowing": true, | |
"ended": false, | |
"endEmitted": false, | |
"reading": true, | |
"sync": false, | |
"needReadable": true, | |
"emittedReadable": false, | |
"readableListening": false, | |
"resumeScheduled": false, | |
"destroyed": false, | |
"defaultEncoding": "utf8", | |
"awaitDrain": 0, | |
"readingMore": false, | |
"decoder": null, | |
"encoding": null | |
}, | |
"readable": true, | |
"domain": null, | |
"_events": { | |
"end": [ | |
null, | |
null | |
], | |
"drain": [ | |
null, | |
null | |
], | |
"error": [ | |
null, | |
null | |
], | |
"close": [ | |
null, | |
null, | |
null | |
] | |
}, | |
"_eventsCount": 9, | |
"_writableState": { | |
"objectMode": false, | |
"highWaterMark": 16384, | |
"finalCalled": false, | |
"needDrain": false, | |
"ending": false, | |
"ended": false, | |
"finished": false, | |
"destroyed": false, | |
"decodeStrings": false, | |
"defaultEncoding": "utf8", | |
"length": 0, | |
"writing": false, | |
"corked": 0, | |
"sync": true, | |
"bufferProcessing": false, | |
"writecb": null, | |
"writelen": 0, | |
"bufferedRequest": null, | |
"lastBufferedRequest": null, | |
"pendingcb": 0, | |
"prefinished": false, | |
"errorEmitted": false, | |
"bufferedRequestCount": 0, | |
"corkedRequestsFree": { | |
"next": null, | |
"entry": null | |
} | |
}, | |
"writable": true, | |
"allowHalfOpen": true, | |
"_bytesDispatched": 0, | |
"_sockname": null, | |
"_pendingData": null, | |
"_pendingEncoding": "", | |
"server": { | |
"domain": null, | |
"_events": {}, | |
"_eventsCount": 2, | |
"_connections": 2, | |
"_handle": { | |
"reading": false, | |
"owner": "[Circular]", | |
"onread": null, | |
"writeQueueSize": 0 | |
}, | |
"_usingSlaves": false, | |
"_slaves": [], | |
"_unref": false, | |
"allowHalfOpen": true, | |
"pauseOnConnect": false, | |
"httpAllowHalfOpen": false, | |
"timeout": 0, | |
"keepAliveTimeout": 5000, | |
"_pendingResponseData": 0, | |
"maxHeadersCount": null, | |
"headersTimeout": 40000, | |
"_connectionKey": "6::::8091" | |
}, | |
"_server": "[Circular]", | |
"parser": { | |
"_headers": [], | |
"_url": "", | |
"_consumed": true, | |
"socket": "[Circular]", | |
"incoming": "[Circular]", | |
"outgoing": null, | |
"parsingHeadersStart": 1580263845319, | |
"maxHeaderPairs": 2000 | |
}, | |
"_paused": false, | |
"_httpMessage": { | |
"domain": null, | |
"_events": { | |
"finish": [ | |
null, | |
null | |
] | |
}, | |
"_eventsCount": 2, | |
"output": [], | |
"outputEncodings": [], | |
"outputCallbacks": [], | |
"outputSize": 0, | |
"writable": true, | |
"_last": false, | |
"upgrading": false, | |
"chunkedEncoding": false, | |
"shouldKeepAlive": false, | |
"useChunkedEncodingByDefault": true, | |
"sendDate": true, | |
"_removedConnection": false, | |
"_removedContLen": false, | |
"_removedTE": false, | |
"_contentLength": null, | |
"_hasBody": true, | |
"_trailer": "", | |
"finished": false, | |
"_headerSent": false, | |
"socket": "[Circular]", | |
"connection": "[Circular]", | |
"_header": null, | |
"_sent100": false, | |
"_expect_continue": false, | |
"req": "[Circular]", | |
"locals": {}, | |
"statusCode": 200 | |
} | |
}, | |
"connection": "[Circular]", | |
"httpVersionMajor": 1, | |
"httpVersionMinor": 1, | |
"httpVersion": "1.1", | |
"complete": true, | |
"headers": { | |
"host": "us-central1-iron-bedrock-264011.cloudfunctions.net", | |
"user-agent": "Slackbot 1.0 (+https://api.slack.com/robots)", | |
"transfer-encoding": "chunked", | |
"accept": "application/json,/", | |
"accept-encoding": "gzip,deflate", | |
"content-type": "application/x-www-form-urlencoded", | |
"forwarded": "for=\"34.203.246.211\";proto=https", | |
"function-execution-id": "a8epkceruxzq", | |
"x-appengine-city": "ashburn", | |
"x-appengine-citylatlong": "39.043757,-77.487442", | |
"x-appengine-country": "US", | |
"x-appengine-default-version-hostname": "db1564e00c689196c-tp.appspot.com", | |
"x-appengine-https": "on", | |
"x-appengine-region": "va", | |
"x-appengine-request-log-id": "5e30e9a500ff0335cc31a00a0d0001737e64623135363465303063363839313936632d7470000164346431323930353139363736663239626166313361376266313861323562663a3138000100", | |
"x-appengine-user-ip": "34.203.246.211", | |
"x-cloud-trace-context": "f3a5debb0e96c3d7799e305b679f4f70/2904283850727421687;o=1", | |
"x-forwarded-for": "34.203.246.211", | |
"x-forwarded-proto": "https", | |
"x-slack-request-timestamp": "1580263845", | |
"x-slack-signature": "v0=ceb9972bef599feebe6285fb13e274df2b8ea5e72d4aad0ad648d4f152b78467", | |
"connection": "close" | |
}, | |
"rawHeaders": [ | |
"Host", | |
"us-central1-iron-bedrock-264011.cloudfunctions.net", | |
"User-Agent", | |
"Slackbot 1.0 (+https://api.slack.com/robots)", | |
"Transfer-Encoding", | |
"chunked", | |
"Accept", | |
"application/json,/", | |
"Accept-Encoding", | |
"gzip,deflate", | |
"Content-Type", | |
"application/x-www-form-urlencoded", | |
"Forwarded", | |
"for=\"34.203.246.211\";proto=https", | |
"Function-Execution-Id", | |
"a8epkceruxzq", | |
"X-Appengine-City", | |
"ashburn", | |
"X-Appengine-Citylatlong", | |
"39.043757,-77.487442", | |
"X-Appengine-Country", | |
"US", | |
"X-Appengine-Default-Version-Hostname", | |
"db1564e00c689196c-tp.appspot.com", | |
"X-Appengine-Https", | |
"on", | |
"X-Appengine-Region", | |
"va", | |
"X-Appengine-Request-Log-Id", | |
"5e30e9a500ff0335cc31a00a0d0001737e64623135363465303063363839313936632d7470000164346431323930353139363736663239626166313361376266313861323562663a3138000100", | |
"X-Appengine-User-Ip", | |
"34.203.246.211", | |
"X-Cloud-Trace-Context", | |
"f3a5debb0e96c3d7799e305b679f4f70/2904283850727421687;o=1", | |
"X-Forwarded-For", | |
"34.203.246.211", | |
"X-Forwarded-Proto", | |
"https", | |
"X-Slack-Request-Timestamp", | |
"1580263845", | |
"X-Slack-Signature", | |
"v0=ceb9972bef599feebe6285fb13e274df2b8ea5e72d4aad0ad648d4f152b78467", | |
"Connection", | |
"close" | |
], | |
"trailers": {}, | |
"rawTrailers": [], | |
"aborted": false, | |
"upgrade": false, | |
"url": "/", | |
"method": "POST", | |
"statusCode": null, | |
"statusMessage": null, | |
"client": "[Circular]", | |
"_consuming": true, | |
"_dumped": false, | |
"baseUrl": "", | |
"originalUrl": "/", | |
"_parsedUrl": { | |
"protocol": null, | |
"slashes": null, | |
"auth": null, | |
"host": null, | |
"port": null, | |
"hostname": null, | |
"hash": null, | |
"search": null, | |
"query": null, | |
"pathname": "/", | |
"path": "/", | |
"href": "/", | |
"_raw": "/" | |
}, | |
"params": { | |
"0": "" | |
}, | |
"query": {}, | |
"res": "[Circular]", | |
"body": { | |
"token": "ipITvfUc46RGfhnFoGYl2xjc", | |
"team_id": "T3JDZTS4V", | |
"team_domain": "e2why", | |
"channel_id": "CS123PGE6", | |
"channel_name": "tobiastesting", | |
"user_id": "U3HMGH3AL", | |
"user_name": "roland", | |
"command": "/mock", | |
"text": "here is some text", | |
"response_url": "https://hooks.slack.com/commands/T3JDZTS4V/916342297345/khlBkFKi9mVBCtL8R3QUofFi", | |
"trigger_id": "926059080564.120475944165.0da9161c232cc1a4be46eb3bfaf8dbb5" | |
}, | |
"_body": true, | |
"rawBody": { | |
"type": "Buffer", | |
"data": [ | |
116, | |
111, | |
107, | |
101, | |
110, | |
61, | |
105, | |
112, | |
73, | |
84, | |
118, | |
102, | |
85, | |
99, | |
52, | |
54, | |
82, | |
71, | |
102, | |
104, | |
110, | |
70, | |
111, | |
71, | |
89, | |
108, | |
50, | |
120, | |
106, | |
99, | |
38, | |
116, | |
101, | |
97, | |
109, | |
95, | |
105, | |
100, | |
61, | |
84, | |
51, | |
74, | |
68, | |
90, | |
84, | |
83, | |
52, | |
86, | |
38, | |
116, | |
101, | |
97, | |
109, | |
95, | |
100, | |
111, | |
109, | |
97, | |
105, | |
110, | |
61, | |
101, | |
50, | |
119, | |
104, | |
121, | |
38, | |
99, | |
104, | |
97, | |
110, | |
110, | |
101, | |
108, | |
95, | |
105, | |
100, | |
61, | |
67, | |
83, | |
49, | |
50, | |
51, | |
80, | |
71, | |
69, | |
54, | |
38, | |
99, | |
104, | |
97, | |
110, | |
110, | |
101, | |
108, | |
95, | |
110, | |
97, | |
109, | |
101, | |
61, | |
116, | |
111, | |
98, | |
105, | |
97, | |
115, | |
116, | |
101, | |
115, | |
116, | |
105, | |
110, | |
103, | |
38, | |
117, | |
115, | |
101, | |
114, | |
95, | |
105, | |
100, | |
61, | |
85, | |
51, | |
72, | |
77, | |
71, | |
72, | |
51, | |
65, | |
76, | |
38, | |
117, | |
115, | |
101, | |
114, | |
95, | |
110, | |
97, | |
109, | |
101, | |
61, | |
114, | |
111, | |
108, | |
97, | |
110, | |
100, | |
38, | |
99, | |
111, | |
109, | |
109, | |
97, | |
110, | |
100, | |
61, | |
37, | |
50, | |
70, | |
109, | |
111, | |
99, | |
107, | |
38, | |
116, | |
101, | |
120, | |
116, | |
61, | |
104, | |
101, | |
114, | |
101, | |
43, | |
105, | |
115, | |
43, | |
115, | |
111, | |
109, | |
101, | |
43, | |
116, | |
101, | |
120, | |
116, | |
38, | |
114, | |
101, | |
115, | |
112, | |
111, | |
110, | |
115, | |
101, | |
95, | |
117, | |
114, | |
108, | |
61, | |
104, | |
116, | |
116, | |
112, | |
115, | |
37, | |
51, | |
65, | |
37, | |
50, | |
70, | |
37, | |
50, | |
70, | |
104, | |
111, | |
111, | |
107, | |
115, | |
46, | |
115, | |
108, | |
97, | |
99, | |
107, | |
46, | |
99, | |
111, | |
109, | |
37, | |
50, | |
70, | |
99, | |
111, | |
109, | |
109, | |
97, | |
110, | |
100, | |
115, | |
37, | |
50, | |
70, | |
84, | |
51, | |
74, | |
68, | |
90, | |
84, | |
83, | |
52, | |
86, | |
37, | |
50, | |
70, | |
57, | |
49, | |
54, | |
51, | |
52, | |
50, | |
50, | |
57, | |
55, | |
51, | |
52, | |
53, | |
37, | |
50, | |
70, | |
107, | |
104, | |
108, | |
66, | |
107, | |
70, | |
75, | |
105, | |
57, | |
109, | |
86, | |
66, | |
67, | |
116, | |
76, | |
56, | |
82, | |
51, | |
81, | |
85, | |
111, | |
102, | |
70, | |
105, | |
38, | |
116, | |
114, | |
105, | |
103, | |
103, | |
101, | |
114, | |
95, | |
105, | |
100, | |
61, | |
57, | |
50, | |
54, | |
48, | |
53, | |
57, | |
48, | |
56, | |
48, | |
53, | |
54, | |
52, | |
46, | |
49, | |
50, | |
48, | |
52, | |
55, | |
53, | |
57, | |
52, | |
52, | |
49, | |
54, | |
53, | |
46, | |
48, | |
100, | |
97, | |
57, | |
49, | |
54, | |
49, | |
99, | |
50, | |
51, | |
50, | |
99, | |
99, | |
49, | |
97, | |
52, | |
98, | |
101, | |
52, | |
54, | |
101, | |
98, | |
51, | |
98, | |
102, | |
97, | |
102, | |
56, | |
100, | |
98, | |
98, | |
53 | |
] | |
}, | |
"route": { | |
"path": "/*", | |
"stack": [ | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "acl" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "bind" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "checkout" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "connect" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "copy" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "delete" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "get" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "head" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "link" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "lock" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "m-search" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "merge" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "mkactivity" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "mkcalendar" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "mkcol" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "move" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "notify" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "options" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "patch" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "post" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "propfind" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "proppatch" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "purge" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "put" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "rebind" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "report" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "search" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "source" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "subscribe" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "trace" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "unbind" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "unlink" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "unlock" | |
}, | |
{ | |
"name": "<anonymous>", | |
"keys": [], | |
"regexp": { | |
"fast_star": false, | |
"fast_slash": false | |
}, | |
"method": "unsubscribe" | |
} | |
], | |
"methods": { | |
"acl": true, | |
"bind": true, | |
"checkout": true, | |
"connect": true, | |
"copy": true, | |
"delete": true, | |
"get": true, | |
"head": true, | |
"link": true, | |
"lock": true, | |
"m-search": true, | |
"merge": true, | |
"mkactivity": true, | |
"mkcalendar": true, | |
"mkcol": true, | |
"move": true, | |
"notify": true, | |
"options": true, | |
"patch": true, | |
"post": true, | |
"propfind": true, | |
"proppatch": true, | |
"purge": true, | |
"put": true, | |
"rebind": true, | |
"report": true, | |
"search": true, | |
"source": true, | |
"subscribe": true, | |
"trace": true, | |
"unbind": true, | |
"unlink": true, | |
"unlock": true, | |
"unsubscribe": true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment