Watch 2 Star 0 Fork 0

netnr / proxyMIT

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
HTTP请求代理,CORS跨域请求,HTTPS支持(cors-anywhere) spread retract

https://proxy.netnr.com

Clone or download
netnr authored update
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

proxy

HTTP请求代理,CORS跨域请求,HTTPS支持

作用

  • 支持跨域请求(转换不支持跨域请求的接口),可直接发起 ajax、fetch
  • 支持HTTPS(解决远程数据接口不支持HTTPS)

接口

使用

拷贝到控制台运行

fetch("https://proxy.zme.ink/https://www.google.com")
	.then(x => x.text())
	.then(function (data) {
		console.log(data);
	})

var $url = "http://wthrcdn.etouch.cn/weather_mini?citykey=101040100";
fetch("https://proxy.zme.ink/" + $url)
	.then(x => x.text())
	.then(function (data) {
		console.log(data);
	})

安装

  • npm install
  • node server.js

Fork

Source

Comments ( 0 )

You need to Sign in for post a comment

Help Search