javascript - 使用 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();
解决方案
推荐阅读
- android - EABI 库是否会在包更新期间使用主要支持的架构进行更新?
- java - 如何在 Flink 中加载外部 jars
- python - 如何将文件复制到 Django Web 服务器的“文档根目录”
- python - 将 RGB 热图图像转换为灰度热图的正确方法
- javascript - 理解 JavaScript 中的 bind()
- sql - 如何在 FUNCTION 中使用 GROUP 函数(MAX)?
- video - 两个视频 - 一个与闪烁的 LED 同步;全部按 GPIO 按钮
- java - 服务和控制器之间打开多线程有什么区别?
- java - Java 8从对象列表创建地图的地图
- angular - 特定页面上的 Ionic 3 导航