Reputation: 51
In my use case I want to create a step in Google Cloud Workflow where I can pass my username and password and return the resultant bearer token in a variable. Was wondering how the yaml config for such a workflow would look like ?
My endpoint expects a request in the following manner :
POST 'https://cloud.business.io/v2/login'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode '[email protected]'
--data-urlencode 'password=APassword123'
Upvotes: 1
Views: 555
Reputation: 51
Found it with a little trial and error !
call: http.post
args:
url: https://cloud.business.io/v2/login
headers:
'Content-Type': 'application/x-www-form-urlencoded'
body :
'username': '[email protected]'
'password': 'APassword123'
result: BearerToken
Upvotes: 4