DEV Community

Discussion on: OpenFaaS - deploying serverless functions to Docker Swarm via a CLI

Collapse
 
wannaknowmo profile image
wannaknowmo

love the article.
how would you parse multiple var with curl to a function?

Collapse
 
developius profile image
Finnian Anderson • Edited

I think the easiest way to do it would be to send the variables with JSON - like below, and then decode it in the function handler:

$ curl -d '{"var1":"thing","var2":"other thing"}' http://localhost/function/fib