【发布时间】:2018-04-23 06:36:11
【问题描述】:
我的代码
url = "https://www.payumoney.com/payment/payment/addPaymentSplit?merchantKey=test&merchantTransactionId=test&totalAmount=0&totalDiscount=0&jsonSplits=[{"amountToBeSettled":0,"aggregatorDiscount":0,"splitDetails":"test","CODAmount":0,"splitAmount":0,"merchantId":"0000","aggregatorCharges":0,"CODMode":0,"aggregatorSubTransactionId":"test","sellerDiscount":0}]"
CloseableHttpClient client = HttpClients.createDefault();
HttpPost post = new HttpPost(url);
第二行出现非法字符错误。我尝试将 [ 编码为 %5B 和 ] 编码为 %5D。还是一样的错误。
使用 apache-commons-httpclient 库。
【问题讨论】:
标签: java http-post apache-commons-httpclient payumoney