All Projects → akamai → httpie-edgegrid

akamai / httpie-edgegrid

Licence: Apache-2.0 license
Plugin for httpie to allow edge grid authentication for Akamai

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to httpie-edgegrid

Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+11971.01%)
Mutual labels:  httpie
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+76786.96%)
Mutual labels:  httpie
portainer-stack-utils
CLI client for Portainer
Stars: ✭ 66 (-4.35%)
Mutual labels:  httpie
httpie-aws-authv4
AWS Auth v4 (API Gateway, Elasticsearch, etc) plugin for HTTPie
Stars: ✭ 37 (-46.38%)
Mutual labels:  httpie
httpie-unixsocket
A UNIX socket plugin for HTTPie
Stars: ✭ 40 (-42.03%)
Mutual labels:  httpie
AwsTerm
A collection of awesome terminal utilities
Stars: ✭ 37 (-46.38%)
Mutual labels:  httpie
dotnet-httpie
Amazing HTTP command-line tool powered by .NET, inspired by httpie
Stars: ✭ 24 (-65.22%)
Mutual labels:  httpie
httpie-image
HTTPie plugin to display images in iTerm2
Stars: ✭ 23 (-66.67%)
Mutual labels:  httpie
AkamaiOPEN-edgegrid-java
Java library for Akamai OPEN EdgeGrid Client Authentication
Stars: ✭ 37 (-46.38%)
Mutual labels:  devexp-edgegrid
terraform-provider-akamai
Terraform Akamai provider
Stars: ✭ 75 (+8.7%)
Mutual labels:  akamai-devexp

httpie-edgegrid

EdgeGrid plugin for HTTPie.

Installation

To install from sources:

$ python setup.py install

When using python 3 on Mac, replace python with python3:

$ python3 setup.py install

If you have problems installing from sources, you could use pip:

$ pip install httpie-edgegrid

Running tests in virtual environment

To test in a virtual environment, run:

$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ python -m unittest discover

Usage

The EdgeGrid plugin relies on a .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, here is an example of what an Akamai OPEN API call would look like:

% http --auth-type edgegrid -a <section_name>: :/<api_endpoint>

Example

Making the diagnostic-tools API [locations]{.title-ref} call:

% http --auth-type edgegrid -a default: :/diagnostic-tools/v2/ghost-locations/available

Parameters

--edgegrid-config

Path to `.edgerc` credentials file (optional, defaults to `~/.edgerc`)

Environment variables

RC_PATH

Path to `.edgerc` credentials file (optional, equivalent to the `--edgegrid-config` parameter)

Troubleshooting

MacOS Sierra users have reported the error "http: error: argument --auth-type/-A: invalid choice: 'edgegrid' (choose from 'basic', 'digest')" after installation. Try installing using pip instead.

The error "ImportError: 'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer" requires you to install an updated version of `pyOpenSSL`:

$ pip install --ignore-installed pyOpenSSL

Since v0.9.4 of httpie the Mac homebrew package is build with python3. If you get an error for "ImportError: No module named cryptography" then probably you installed httpie-edgegrid with python2.7 (unsupported). To explicitly install with python3 use:

$ sudo python3 setup.py install

Or with pip3:

$ sudo pip3 install httpie-edgegrid

Advisories

Starting with HTTPie version 2.3.0 uploads are streamed, causing an issue posting JSON payloads as those don't include a content-length causing an error with the Edgegrid authentication libraries. See Issue #49 for more details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].