这里是一个非常哈克解决方法: 因为请求通过开发者控制台工作正常,我检查的要求,并试图repeate它认为卷曲,似乎工作正常,命令如下:
curl 'https://dev.cognitive.microsoft.com/console/query' -H 'Content-Type: application/json' --data-binary '{"httpMethod":"GET","host":"api.cognitive.microsoft.com","scheme":"https","path":"bing/v5.0/news/?Category=Entertainment","headers":[{"name":"Host","value":"api.cognitive.microsoft.com","inputTypeValue":"text","revealed":false,"options":null,"required":true,"readonly":true,"custom":false},{"name":"Ocp-Apim-Subscription-Key","value":"<your key value>","inputTypeValue":"password","revealed":false,"options":[],"required":true,"readonly":false,"custom":true,"secret":true}],"parameters":[{"name":"Category","value":"Entertainment","inputType":"text","required":false,"options":["Business","Entertainment","Health","Politics","ScienceAndTechnology","Sports","US/UK","World"],"custom":false,"description":"<p>Specifies which category of news articles the caller wants returned.</p>\n","typeName":"string"}],"body":""}'
我送JSON数据是这
{ “列举HTTPMethod”(从上面的命令复制): “GET”, “宿主”: “api.cognitive.microsoft.com”, “方案” :“https”,“路径”:“bing/v5.0/news /?Category = Entertainment”, “headers”:[{“name”:“Host”,“value”: “api.cognitive.microsoft.com”,“inputTypeValue”:“text”, “reveal”:false,“options”:null ,“required”:true, “readonly”:true,“custom”:false},{“name”: “Ocp-Apim-Subscription-Key”,“value”:“”, “inputTypeValue”密码“,”显示“:假,”选项“:[], ”required“:true,”readonly“:false,”custom“:true,”secret“: true}], “name”:“Category”,“value”: “Entertainment”,“inputType”:“text”,“required”:false, “options”:[“Business”,“Entertainment”政治学“, ”科学与技术“,”体育“,”美国/英国“,”世界“],”风俗“: fal se,“description”:“
指定呼叫者想要返回哪类新闻文章 。
\ n”, “的typeName”: “串”}], “体”: “”}
我会记住这是正确的,现在因为我无法找到任何其他解决方案