From 12080cb162a3b9429ddcacac5c7f00f969076d85 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Sat, 22 Jun 2024 10:20:00 +0800 Subject: [PATCH] up --- .../fangjia/script/gj/data_handle/PoiLocation.groovy | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/PoiLocation.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/PoiLocation.groovy index 32eb9ca85..45520fd29 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/PoiLocation.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/PoiLocation.groovy @@ -231,9 +231,14 @@ class PoiLocation { } """ HttpRequest request = new HttpRequest() - String res = request.postWithBody(seawaterUrl, JSONObject.fromObject(body.toString()), header, "UTF-8") - def response = JSONObject.fromObject(res) - println(response) + try{ + String res = request.postWithBody(seawaterUrl, JSONObject.fromObject(body.toString()), header, "UTF-8") + def response = JSONObject.fromObject(res) + println(response) + }catch(Exception e){ + println "error : "+e.getMessage() + } + }