Skip to content

Shell script command wrapper for cURL to enable enhanced debug headers.

License

Notifications You must be signed in to change notification settings

shigeyf/edgeworkers-curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

edgeworkers-curl

Overview

Shell script command wrapper for cURL to enable enhanced debug headers.

ewcurl is a simple wrapper to help triggering http requests against your Akamai property which enables your EdgeWorkers applications. The script prepares curl command arguments in order to include an HTTP request header of EdgeWorkers trace token by using Akamai CLI command, then uses curl to trigger a HTTP request with the HTTP request header to enable EdgeWorkers enhanced debug headers for helping you with your EdgeWorkers JavaScript app debugging logs.

To enable EdgeWorkers enhanced debug headers, you will need to configure your Akamai property to add a secret key. Please follow the instructions in the Akamai EdgeWorkers documentation: Add a secret key to your property.

CONFIGURATION

This script replies on Akamai CLI command and an ~/.edgerc credentials file that needs to be created in your home directory and organized by [section] following the format below. Each [section] can contain a different credentials set allowing you to store all of your credentials in a single ~/.edgerc file.

    [default]
    client_secret = xxxx
    host = xxxx # Note, don't include the https:// here
    access_token = xxxx
    client_token = xxxx
    max-body = xxxx

    [section1]
    client_secret = xxxx
    host = xxxx # Note, don't include the https:// here
    access_token = xxxx
    client_token = xxxx
    max-body = xxxx

Once you have the credentials set up you can use ewcurl.

Use the -s argument to specify which section from the configuration file contains the desired credentials for your Akamai CLI command in this script.

Usage

ewcurl is a wrapper for curl command, and give the following argument to control options for ewcurl command.

Usage:
    ewcurl [ewcurl options] -- [curl options] [curl URL]
    optons:
       -a     (optional) Account Switch Key for Akamai CLI command.
       -h     Hostname for EdgeWorkers target property.
       -s     (optional) Section name in ~/.edgerc for Akamai CLI credential.
                         [default value is 'papi'].

CHANGES

2022-03-01:

  • Initial releases.

About

Shell script command wrapper for cURL to enable enhanced debug headers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages