java发送post请求

private String sendPost(String param) {
        Request request = Request.Post(api).bodyString(param, ContentType.APPLICATION_FORM_URLENCODED.withCharset(Consts.UTF_8));
        try {
            return request.execute().returnContent().asString();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return "";
    }

你可能感兴趣的:(java发送post请求)