https://api.polyv.net/live/v3/channel/stream/stop-pull-stream
{
"code": 200,
"status": "success",
"message": "",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "appId is required.",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "application not found.",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "invalid timestamp.",
"data": ""
}
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}
public static void testStopPullStream() {
String url = "https://api.polyv.net/live/v3/channel/stream/stop-pull-stream";
// 用户对应的appId和加密串
String appId = "xxxxxxxxx";
String appSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
int channelId = 10001;
Map<String, String> params = new HashMap<>();
params.put("channelId", String.valueOf(channelId));
PolyvTool.setLiveSign(params, appId, appSecret);
// 调用Polyv的httpClient工具类发送请求
String content = HttpClientUtil.getInstance()
.sendHttpPost(url, params);
System.out.println(content);
}