【发布时间】:2017-02-27 10:19:09
【问题描述】:
我正在尝试使用 curl 使用 POST URL。卷曲请求如下:
curl -k -H "Content-Type : application/x-www-form-urlencoded;charset=UTF-8" -H "Accept: application/json, text/plain, */*" -H "Authorization : OAuth oauth_consumer_key=2IaG9fzswU1f8bJ2bWCIIQ" -X POST -d "{'consumer_id':'google_bps','app_id':'google_bps_app','user_id':'bala.gto3','first_name':'bala','last_name':'gto3','email':'bala.gto3@gmail.com'}" https://ec2-54-189-116-121.us-west-2.compute.amazonaws.com/cec_baseline/api/users/save
虽然 JSON 数据是准确的,但我收到了错误的请求错误。
回复如下:
{"status":400,"code":0,"message":"Bad Parameters: Consumer Id and Application Id Mandatory!","description":"BAD REQUEST","result":[]}
【问题讨论】: