到手机剪切板
调用说明
- 请求参数
参数 | 类型 | 说明 | 备注 |
---|---|---|---|
fun | 字符串 | /shortcut/clipboard/set | 请求功能名 |
id | 字符串 | 设备id | 多个设备用逗号隔开 |
sleep | 整数 | 延迟返回 | 秒为单位,一般无需延迟,只是在有些手机上可能要延时一下粘贴才有效 |
text | 字符串 | 要发送的文字 | |
outtime | 布尔值 | 超时时间 | 返回数据的超时时间,单位毫秒,默认15秒 |
- httpGet请求示例
curl --request GET \
--url 'http://192.168.9.9:9911/api/shortcut/clipboard/set?id=6C:8D:C1:67:04:29&text=aaa'
- httpPost请求示例
curl --request POST \
--url http://192.168.9.9:9911/api \
--header "content-type: multipart/form-data" \
--form "fun=/shortcut/clipboard/set" \
--form "id=6C:8D:C1:67:04:29" \
--form "text=aaa"
- httpPost json请求示例【websocket也可发送同样json请求】
curl --request POST \
--url http://192.168.9.9:9911/api \
--header 'Content-Type: application/json' \
--data '{
"fun": "/shortcut/clipboard/set",
"data": {
"id": "6C:8D:C1:67:04:29",
"text":"aaa"
}
}'
响应结果
{
"data": {
"code": 0,
"id": "6C:8D:C1:67:04:29",
"message": "成功"
},
"status": 200,
"message": "成功",
"msgid": 38,
"fun": "/shortcut/clipboard/set"
}
- 响应data数据字段说明
无