1. 程式人生 > >阿里雲api GateWay呼叫

阿里雲api GateWay呼叫


        String json = "{\"name\": \"張三\"}";
        byte[] body = json.getBytes();
        SyncApiClient_winner_api testClient = SyncApiClient_winner_api.newBuilder()
                .appKey("")
                .appSecret("")
                .build();
        ApiResponse response = testClient.getName(body);
        System.out.println(response.getStatusCode());
        String s = new String(response.getBody(), "UTF-8");
        System.out.println(s);