Edgegrid plugin for httpie.
httpie-edgegrid的Python项目详细描述
用于HTTPie的edgegrid插件。
安装
从源安装:
$ python setup.py install
用法
EdgeGrid插件依赖于一个.edgerc凭据文件,该文件需要在主目录中创建,并按照以下格式由[节]组织。每个[部分]都可以包含不同的凭据集,允许您将所有凭据存储在单个.edgerc文件中。
[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
一旦您设置了凭据,下面是一个示例,展示了一个akamai open api调用的样子:
% http --auth-type edgegrid -a <section_name>: :/<api_endpoint>
示例
使诊断工具api位置调用:
% http --auth-type edgegrid -a default: :/diagnostic-tools/v1/locations