You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ta...@apache.org on 2019/11/14 22:37:33 UTC
[openwhisk-composer] branch master updated: feat: add support for
passthrough http optons on deploy (#46)
This is an automated email from the ASF dual-hosted git repository.
tardieu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-composer.git
The following commit(s) were added to refs/heads/master by this push:
new 308f149 feat: add support for passthrough http optons on deploy (#46)
308f149 is described below
commit 308f149c6829ae976b92124d497189ef86a019c5
Author: Nick Mitchell <st...@users.noreply.github.com>
AuthorDate: Thu Nov 14 17:37:15 2019 -0500
feat: add support for passthrough http optons on deploy (#46)
---
client.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/client.js b/client.js
index 2794e0f..233b4a2 100644
--- a/client.js
+++ b/client.js
@@ -81,8 +81,13 @@ class Compositions {
this.actions = wsk.actions
}
- deploy (composition, overwrite, debug, kind, timeout, memory, logs) {
- const actions = (composition.actions || []).concat(conductor.generate(composition, debug, kind, timeout, memory, logs))
+ deploy (composition, overwrite, debug, kind, timeout, memory, logs, httpOptions) {
+ function addHttpOptions (action) {
+ // the openwhisk npm allows passthrough request-style options
+ return Object.assign({}, action, httpOptions)
+ }
+
+ const actions = (composition.actions || []).concat(conductor.generate(composition, debug, kind, timeout, memory, logs)).map(addHttpOptions)
return actions.reduce((promise, action) => promise.then(() => overwrite && this.actions.delete(action).catch(() => { }))
.then(() => this.actions.create(action)), Promise.resolve())
.then(() => actions)