背景: 在用robot做接口自动化时,有一个查询接口需要用到登录后返回的token等信息作为cookies作为参数一起请求(token是在返回体中,并不在cookies中), 刚好create session关键字有cookies参数,但是传cookies参数时,会报错ValueError: need more than 1 value to unpack,耗费了很久没有解决 ${login_cookies}= Create Dictionary token=ef2f3216-a63c-4a8
直接写成啦一个MyNet.cs类方便使用 get/post方法请求 //get请求 MyNet.SendRequest("http://www.baidu.com"); //post请求 var param = new Dictionary<string, string> { {"a","this is a param" }, {"b","this second param"} }; MyNet
1.通过允许跨域访问实现了跨域请求,但为了使每个请求带上session信息,我设置了withCredentials ,即: axios.defaults.withCredentials = true 然后跨域请求时会出现如下问题: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response