Node.js: 请求模块是否支持无模式 URI?
Node.js: Are schemaless URIs supported by request module?
request 模块是否支持无模式 URI?
我在文档中找不到任何参考资料,谷歌搜索也找不到。
尝试请求无模式 URI (//www.example.com/
),它抱怨 "Error: Invalid URI"...
这些称为协议相对 URL。不推荐 because SSL is encouraged everywhere.
当 运行 节点脚本没有基本方案,而不是 运行 在浏览器中。 request
无法知道使用哪种方案。
> url.parse("//www.example.com").protocol
null
request 模块是否支持无模式 URI?
我在文档中找不到任何参考资料,谷歌搜索也找不到。
尝试请求无模式 URI (//www.example.com/
),它抱怨 "Error: Invalid URI"...
这些称为协议相对 URL。不推荐 because SSL is encouraged everywhere.
当 运行 节点脚本没有基本方案,而不是 运行 在浏览器中。 request
无法知道使用哪种方案。
> url.parse("//www.example.com").protocol
null