通过 Http 请求获取 GitHub 文件内容

 原始GitHub 文件地址:

  https://github.com/eric-projects/cv/blob/master/demo/example.json

可Http访问资源内容的地址:

  https://raw.githubusercontent.com/eric-projects/cv/master/demo/example.json

  •  raw.githubusercontent.com  资源服务器
  •  eric-projects 用户名
  •  cv 仓库名
  •  master/demo/example.json  文件地址

 请求结果:

 解决访问https://raw.githubusercontent.com 无法连接问题:

 通过https://www.ipaddress.com/ 网站,找到 raw.githubusercontent.com 对应的IP 并加入本机Host 文件
 199.232.68.133 raw.githubusercontent.com
原文地址:https://www.cnblogs.com/ctfyfd/p/13710943.html