GET /api/v1/shares/{token}/media
GET
/api/v1/shares/{token}/media分享媒体流(需 URL 携带 expire+sig 签名,支持 Range 请求)
请求参数
| 名称 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
token | string | path | 是 | — |
expire | integer | query | 是 | — |
sig | string | query | 是 | — |
请求示例
cURL
curl -X GET 'http://localhost:8080/api/v1/shares/{token}/media' \
-H 'Accept: application/json'JavaScript
const res = await fetch('http://localhost:8080/api/v1/shares/{token}/media', {
method: 'GET',
headers: {
'Accept': 'application/json'
},
});
const data = await res.json();Python
import requests
res = requests.get(
'http://localhost:8080/api/v1/shares/{token}/media',
headers={'Accept': 'application/json'}
)
print(res.json())响应
200媒体文件流
404资源不存在
application/json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "not_found"
},
"message": {
"type": "string",
"example": "资源不存在"
}
}
}在线调试
在线调试
凭证仅保存在当前页面内存中自定义请求 Header
