Skip to content

Instantly share code, notes, and snippets.

@ilaif
Created April 16, 2019 21:04
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 ilaif/847ad5e94fe53b11fb2bedbe9fa35c93 to your computer and use it in GitHub Desktop.
Save ilaif/847ad5e94fe53b11fb2bedbe9fa35c93 to your computer and use it in GitHub Desktop.
instrument-everything-blog-replace-instrumented-vcls
def delete_custom_vcl(service_id, version, name):
url = 'https://api.fastly.com/service/{}/version/{}/vcl/{}'.format(service_id, version, name)
response = requests.request('DELETE', url, headers={...})
def create_custom_vcl(service_id, version, vcl_object):
url = 'https://api.fastly.com/service/{}/version/{}/vcl'.format(service_id, version)
response = requests.request('POST', url, headers={...}, data=urlencode(vcl_object))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment