You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/11/22 03:06:07 UTC

[GitHub] csantanapr opened a new issue #147: Provide ability to pass parameters as a JSON object on the command line

csantanapr opened a new issue #147: Provide ability to pass parameters as a JSON object on the command line
URL: https://github.com/apache/incubator-openwhisk-cli/issues/147
 
 
   @l2fprod commented on [Wed Nov 16 2016](https://github.com/apache/incubator-openwhisk/issues/1513)
   
   Just like I can pass the JSON body of a request on the command line with cURL, I'd like to be able to pass the parameters the same way with the OpenWhisk CLI
   
   ```
   curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:3000/api/login
   ```
   
   as example:
   
   ```
   wsk action invoke --body '{"key1": "value1", "object1": { "object1Prop": "anotherValue" }}'
   ```
   
   ---
   
   @mbehrendt commented on [Wed Nov 16 2016](https://github.com/apache/incubator-openwhisk/issues/1513#issuecomment-260885474)
   
   good point.
   
   should we even allow piping it in, sth like `echo <json> | wsk action invoke myAction` ?
   
   
   ---
   
   @dubeejw commented on [Wed Nov 16 2016](https://github.com/apache/incubator-openwhisk/issues/1513#issuecomment-260973313)
   
   You can put the JSON in a file, and pass that filename to the -P flag.
   
   
   ---
   
   @l2fprod commented on [Wed Nov 16 2016](https://github.com/apache/incubator-openwhisk/issues/1513#issuecomment-260973908)
   
   true but here I don't want to have to create a temp file.
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services