(我是卷曲的,也是新朋友)
我正在尝试从API获取Body数据
使用curl with following命令但无法获取除故障字符串
之外的任何数据curl" https://staging.api.pearson.com/content/scapi/urn:pearson:manifestation:014f333d-ceda-476f-81f2-d3d6c89ace42"
我得到的错误是:
{"fault":{"faultstring":"Failed to resolve API Key variable request.header.x-api key","detail":"errorcode":"steps.oauth.v2.FailedToResolveAPIKey"}}}
但是在浏览器中多次访问URL时,我可以根据需要获取JSON数据
CURL woking code
curl "https://staging.api.pearson.com/content/scapi/urn:pearson:manifestation:014f333d-ceda-476f-81f2-d3d6c89ace42" -H "Accept:application/json" -H "Accept-Encoding:gzip, deflate, sdch, br" -H "Accept-Language:en-US,en;q=0.8 " -H "Connection:keep-alive" -H "Host:staging.api.pearson.com" -H "X-ApiKey:7ij8zrLkCNR9DtAXx3KJ6yutoYnk4SAx" -H "X-PearsonSSOSession:AQIC5wM2LY4Sfczr6fmuhzvfN4dwnpK3c9K8tyduHkwg7sA.*AAJTSQACMDIAAlNLABQtNTk5Nzg3OTI1MTgxNTYxNjE3MAACUzEAAjAx*"
请有人建议获取JSON数据
对不起我是新来的卷曲和apigee
由于