第一次将库HttpLibrary.HTTP与机器人框架结合使用。我的api url是这样的:
https://www.app.com:8080/rest/api/customer/phone/personnalData
当我用google打开这个url时,它可以工作,并且我得到响应{"phone":false}。
我试着对机器人框架做同样的事情:
Create Http Context https://www.app.com:8080/rest/api/customer/phone /personnalData
Set Request Header Content-Type application/json
Set Request Header Accept application/json
HttpLibrary.HTTP.GET https://www.app.com:8080/rest/api/customer/phone /personnalData
${Body}= HttpLibrary.HTTP.Get Response Body
JSON.Save Json ${Body} C:/RESTResponseBody.json我得到了这样的回应:
[ FAIL | InvalidURL: nonnumeric port: '9448/rest/api/customer/phone/personnalData' ]
有什么帮助吗。
发布于 2018-12-04 07:18:32
您需要以下面的方式使用http。
Create Http Context host=www.app.com:8080 scheme=https
Set Request Header Content-Type application/json
Set Request Header Accept application/json
HttpLibrary.HTTP.GET /rest/api/customer/phone /personnalData
${Body}= HttpLibrary.HTTP.Get Response Body
JSON.Save Json ${Body} C:/RESTResponseBody.jsonhttps://stackoverflow.com/questions/53600028
复制相似问题