gg433
7 years agoNew Contributor III
Options for triggered task
Does anyone know of a way to trigger a pipeline task without sending the Authorization header? Can you pass the token in a parameter? What other options are there?
Does anyone know of a way to trigger a pipeline task without sending the Authorization header? Can you pass the token in a parameter? What other options are there?
I believe you can pass it through as a query parameter as well. See this documentation and look for To execute a Pipeline using a Bearer token for authentication through the bearer_token query parameter.
[Update, August 2020: Look up “Run a Pipeline using a Bearer token for authentication through the bearer_token query parameter” on the page Running a Triggered Task]
Thanks! It works. Do you know how I can get it to accept url encoded data. I need to capture the name/value pairs.
What type of snap can I use to receive the x-www-form-urlencoded data posting to the pipeline?
What type of snap can I use to receive the x-www-form-urlencoded data posting to the pipeline?
A Mapper Snap with a Binary Input View
To convert the request body in x-www-form-urlencoded-format to JSON, the following expression could be used:
Base64.decode(Base64.encode($content)).split("&").map(x => x.split("=")).toObject(x => x[0], x => x[1])
with Target Path $
(some improvement could be made with URL decoding the key and value values)
This is obviously a very technical solution so I’d like to look into simplifying it significantly.