开发者资源
完整的API文档、代码示例和SDK,帮助您快速集成Base64功能。
快速开始
1. 获取API密钥
注册账号后,在控制台获取您的API密钥
2. 安装SDK
使用npm、pip或go get安装对应语言的SDK
3. 调用API
使用SDK封装的方法进行编码解码操作
代码示例
// Node.js / 浏览器
const text = 'Hello World';
const encoded = Buffer.from(text).toString('base64');
const decoded = Buffer.from(encoded, 'base64').toString('utf8');
// 浏览器原生
const encoded = btoa('Hello World');
const decoded = atob('SGVsbG8gV29ybGQ=');API接口
GET
/api/v1/encode编码文本为Base64
text: string *encoding: string
GET
/api/v1/decode解码Base64为文本
base64: string *encoding: string
POST
/api/v1/file/encode将文件编码为Base64
file: file *
POST
/api/v1/file/decode将Base64解码为文件
base64: string *filename: string *
SDK下载
Node.js SDK
适用于Node.js环境的SDK包
npm install @base64club/sdkPython SDK
适用于Python 3.8+的SDK包
pip install base64club-sdkGo SDK
适用于Go 1.18+的SDK包
go get github.com/base64club/sdk-goJava SDK
适用于Java 11+的SDK包
Maven: com.base64club:sdk:1.0.0