Git Product home page Git Product logo

workers's Introduction

Cloudflare Workers

❤ api

常用的接口

接口


❤ cors

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

接口

  • Host/{URL}
  • https://cors.zme.ink/{URL}

示例

// 拷贝到控制台运行
var $url = "http://wthrcdn.etouch.cn/weather_mini?citykey=101040100";
fetch("https://cors.zme.ink/" + $url).then(x => x.text()).then(console.log)

❤ raw

GitHub 仓库内容直接浏览,替换 raw.githubusercontent.com
处理 svg、js、css 输出的 Content-Type

接口

  • Host/{name}/{repos}/{branch}/{path}
  • 替换 githubusercontent.comzme.ink

示例


❤ upload

基于 Token 授权上传(可限制格式的)文件到(白名单)GitHub仓库

接口

  • upload.zme.ink
  • POST请求,参数:
// 二进制的流的方式发送文件,整个上传内容都为文件内容, 其他参数在URL上
binary

// url 参数
or:{owner}/{repos} 账号/仓库
name:filename.jpg 文件名
pathname:(可选)自定义路径

示例


安装

套餐

CPU 日请求 突发速率 脚本大小
10ms 100,000 10分钟1000个请求 压缩后1M

详情:https://developers.cloudflare.com/workers/about/limits/

Source


通知

额度顶不住了,使用量大请用自己的账号搭建服务吧,谢谢!!!

图片说明

如果你不想麻烦,也许你可以赞助我升级为付费用户 $5/month 1千万请求量,请备注来自 cfw

workers's People

Contributors

netnr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.