<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 組件源碼 /** * <b>方法描述:</b> 服務調用(ip-port) <br/> * <b>創建者:</b> admin <br/> * <b>創建時間:</b> 2020-07-09 16:18:53 <br/> * * @param url 入參|接口地址|{@link java.lang.String} * @param json 入參|參數|{@link java.lang.String} * @param outPara 出參|Rest接口返回參數|{@link java.lang.String} * @return 0 失敗<br/> * 1 成功<br/> */ @Component(label = "服務調用(ip-port)", style = "判斷型", type = "同步組件", comment = "調用HTTP接口,通過使用IP+端口 全路徑的URL地址,例:http://192.168.1.53:1110/bus/test。使用json格式。僅限于post請求", version = "1.0.0", deprecated = false, author = "admin", date = "2020-07-09 04:18:53") @InParams(param = { @Param(name = "url", comment = "接口地址", type = java.lang.String.class), @Param(name = "json", comment = "參數", type = java.lang.String.class) }) @OutParams(param = { @Param(name = "outPara", comment = "Rest接口返回參數", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "0", desp = "失敗"), @Return(id = "1", desp = "成功") }) public static ResultBase P_doPostJson(String url, String json) { CloseableHttpClient httpClient = HttpClients.createDefault(); CloseableHttpResponse response = null; String resultString = ""; try { HttpPost httpPost = new HttpPost(url); StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON); httpPost.setEntity(entity); AppLog.info("執行 http請求,url={},params={}", url, json); response = httpClient.execute(httpPost); resultString = EntityUtils.toString(response.getEntity(), "utf-8"); AppLog.info("http 請求返回參數={}", resultString); } catch (Exception e) { AppLog.error(e.getMessage(), e); return ResultBase.newFailureResult("TPTK0023", "調用第三方接口異常:" + AppLog.errorMsg(e)); } finally { try { response.close(); } catch (IOException e) { AppLog.error(e); } } return ResultBase.newSuccessResult(resultString); } # 交易中組件使用方式 ![](https://img.kancloud.cn/7d/f4/7df41f801903cf91fe263eb0809573b1_1188x750.jpg) # 參數說明及示例 ## 入口參數 接口地址:其他服務的接口地址,填寫ip:端口等方式,示例: `"http://192.168.1.53:1110/bus/test"` 參數:接口請求參數,傳入json字符串,示例: `"{\"sex\":\"男\",\"add\":\"重慶\"}"` ## 出口參數 Rest接口返回參數:調用接口返回結果,示例: `__INNER__["result"]` > 調用HTTP接口,通過使用IP+端口 全路徑的URL地址,例:`http://192.168.1.53:1110/bus/test`。使用json格式。僅限于post請求
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看