首页 > 解决方案 > 使用 URN 而不是 URL 的 HTTP 请求?

问题描述

发出 HTTP 请求时是否可以使用 URN(统一资源名称)而不是 URL(统一资源定位器)?

例子

request.open('GET', '/admin/customer/tkey.json', true);
request.send();

而不是这个...

request.open('GET', 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/4621/admin/customer/tkey.json', true);
request.send();

标签: javascriptjsonhttphttps

解决方案


推荐阅读