MIT License

项目介绍

gnuns/allOrigins 是一个托管在 GitHub 上的开源项目,主要使用 JavaScript 编写,采用 MIT License 许可证,目前获得 997 个 Star、184 次 Fork。

仓库全名
gnuns/allOrigins
开源许可证
MIT License
Star 数
997
Fork 数
184
未关闭 Issue
36

README 摘要

All Origins ======= Pull contents from any page via API (as JSON/P or raw) and avoid Same-origin policy problems. A free and open source javascript clone of AnyOrigin, inspired by Whatever Origin, but with support to gzipped pages. Examples To fetch data from http://wikipedia.org: Or with jQuery Options charset Description: Set the response character encoding (charset) \ Example…

完整内容见 GitHub 原始 README 或本页 。

常见问题

allOrigins 用什么语言开发?

主要使用 JavaScript 编写,采用 MIT License 许可证,目前有 997 个 Star。

allOrigins 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 allOrigins 的源码?

可以直接克隆仓库:git clone https://github.com/gnuns/allOrigins.git,默认分支为 main;安装与运行步骤见仓库 README。

allOrigins 最近还在维护吗?

仓库最近一次更新为 2023年2月26日,当前有 36 个未关闭 Issue;Star 数为 997,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

:alien: Pull content from any page as JSON via API

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1380
价值分
653
活跃状态
活跃

语言占比

Dockerfile
JavaScript

README

All Origins

FOSSA Status Build Status Donate!

Pull contents from any page via API (as JSON/P or raw) and avoid Same-origin policy problems.


A free and open source javascript clone of AnyOrigin, inspired by Whatever Origin, but with support to gzipped pages.

Examples

To fetch data from http://wikipedia.org:

fetch(`https://api.allorigins.win/get?url=${encodeURIComponent('https://wikipedia.org')}`)
  .then(response => {
    if (response.ok) return response.json()
    throw new Error('Network response was not ok.')
  })
  .then(data => console.log(data.contents));

Or with jQuery

$.getJSON('https://api.allorigins.win/get?url=' + encodeURIComponent('https://wikipedia.org'), function (data) {
    alert(data.contents);
});

Options

charset

Description: Set the response character encoding (charset)
Example: https://api.allorigins.win/get?charset=ISO-8859-1&url=https://pt.wikipedia.org/

raw

Description: Get the raw contents (CORS)
Example: https://api.allorigins.win/raw?url=https://example.org/

callback

Description: Get a JSONP response
Example: https://api.allorigins.win/get?callback=myFunc&url=https://example.org/

On your own server


# Clone the repo
git clone https://github.com/gnuns/AllOrigins

# Install dependencies
cd AllOrigins
npm install

# Fire it up!
npm start # the default port is 1458

License

FOSSA Status

评论

暂无评论