Skip to content

Instantly share code, notes, and snippets.

@hashiva
Created December 18, 2017 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hashiva/2b294a9356fbdccfcf9555b72af301d3 to your computer and use it in GitHub Desktop.
Save hashiva/2b294a9356fbdccfcf9555b72af301d3 to your computer and use it in GitHub Desktop.
import urllib2
def trigger_job(event, context):
resultMap = {}
url = "https://manager.cloudautomator.com/trigger/XXXXXXXXXXXXXXXXXXXX"
responce = {}
headers = {
"Authorization":"CAAuth XXXXXXXXXXXXXXXXXXXXXXXXX",
"Contents-Length":"0"
}
req = urllib2.Request(url, "\r\n", headers)
res = urllib2.urlopen(req)
resultMap["ca_http_response"] = str(res.read())
return resultMap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment