在做易宝对账的时候,用 HttpUrlConnection 发送 POST 请求,返回 error,用 HttpClient 就正常,所以请教一下大家是什么原因,下面的数据是用 Fiddler 抓的包。 authorize_no 是商户账户,certify_token 是 AES 加密后的数据
POST http://o2o.yeepay.com/zgt/auth/AuthDown/downloadOrderDocument HTTP/1.1 User-Agent: Apache-HttpClient/4.5 Accept-Encoding: gzip,deflate Content-Type: application/x-www-formurlencoded Content-Length: 327 Host: o2o.yeepay.com Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2 Connection: keep-alive
authorize_no=10000447996&certify_token=F1C00E69D568BF1F130BEA29083EB7E6596F19B3243202C175388864AA4C0327E14938D6774B657CC44C5C4EA8377B30B61A5CD2D399FCA087E28D62E86F0D69439A93FA913D39D2C4F5ADCB38B364F91BA9B1EDA114DF5C556A15286D9A68CF326E89117E4420CECC9E62E41B8816B451290A26D573367923E9CB59E6EEA970A27F0F8B953872162D7C594542561ADC
HTTP/1.1 200 OK Server: Tengine/2.1.1 Date: Thu, 28 Sep 2017 07:34:33 GMT Content-Length: 34 Connection: keep-alive Set-Cookie: JSESSIONID=52D08DC323ACB46371D0E8E014C1AD07; Path=/zgt/; HttpOnly Set-Cookie: BIGipServerpool_ad_O2O_app_http=2752161984.36895.0000; expires=Thu, 28-. Sep-2017 08:04:33 GMT; path=/
{"error":"请求参数有误!"}
POST http://o2o.yeepay.com/zgt/auth/AuthDown/downloadOrderDocument HTTP/1.1 Content-Length: 327 Content-Type: application/x-www-form-urlencoded Host: o2o.yeepay.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.5 (Java/1.6.0_13) Accept-Encoding: gzip,deflate
authorize_no=10000447996&certify_token=F1C00E69D568BF1F130BEA29083EB7E6596F19B3243202C175388864AA4C0327E14938D6774B657CC44C5C4EA8377B30B61A5CD2D399FCA087E28D62E86F0D69439A93FA913D39D2C4F5ADCB38B364F91BA9B1EDA114DF5C556A15286D9A68CF326E89117E4420CECC9E62E41B8816B451290A26D573367923E9CB59E6EEA970A27F0F8B953872162D7C594542561ADC
HTTP/1.1 200 OK Server: Tengine/2.1.1 Date: Thu, 28 Sep 2017 07:34:49 GMT Content-Length: 93 Connection: keep-alive Set-Cookie: JSESSIONID=DE761135579D1154CC90DCA94A25E6B9; Path=/zgt/; HttpOnly Set-Cookie: BIGipServerpool_ad_O2O_app_http=2802493632.36895.0000; expires=Thu, 28-Sep-2017 08:04:49 GMT; path=/
{"message":"10000447996 请求的 2017-09-27pay 类型的 txt 文件不存在!","success":false}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.