Java docking Tencent cloud live broadcast


Signature authorization

public static  T TecentDoPostJsonV3(String url,String key,String secretId, TecentPublicParams header, String json, OkHttpClient httpClient, Class clazz) throws Exception {

Common parameter entity class

public class TecentPublicParams {
    private String X_TC_Action;
    private String X_TC_Region;
    private String X_TC_Timestamp = Long.toString(System.currentTimeMillis() / 1000);
    private String X_TC_Version;
    private String Authorization;
    private String X_TC_Language = "zh-CN";
    private String X_TC_Token;

    public String getX_TC_Action() {
        return X_TC_Action;

    public void setX_TC_Action(String x_TC_Action) {
        X_TC_Action = x_TC_Action;

    public String getX_TC_Region() {
        return X_TC_Region;

    public void setX_TC_Region(String x_TC_Region) {
        X_TC_Region = x_TC_Region;

    public String getX_TC_Timestamp() {
        return X_TC_Timestamp;

    public void setX_TC_Timestamp(String x_TC_Timestamp) {
        X_TC_Timestamp = x_TC_Timestamp;

    public String getX_TC_Version() {
        return X_TC_Version;

    public void setX_TC_Version(String x_TC_Version) {
        X_TC_Version = x_TC_Version;

    public String getAuthorization() {
        return Authorization;

    public void setAuthorization(String authorization) {
        Authorization = authorization;

    public String getX_TC_Language() {
        return X_TC_Language;

    public void setX_TC_Language(String x_TC_Language) {
        X_TC_Language = x_TC_Language;

    public String getX_TC_Token() {
        return X_TC_Token;

    public void setX_TC_Token(String x_TC_Token) {
        X_TC_Token = x_TC_Token;

Call method

String tencentLiveApi = "";

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today

Apache sqoop

Source: dark horse big data 1.png From the standpoint of Apache, data flow can be divided into data import and export: Import: data import. RDBMS—–>Hadoop Export: data export. Hadoop—->RDBMS 1.2 sqoop installation The prerequisite for installing sqoop is that you already have a Java and Hadoop environment. Latest stable version: 1.4.6 Download the sqoop installation […]