pay模块使用jodd-http方式,已支持证书方式#189
Merged
binarywang merged 3 commits intobinarywang:developfrom Apr 19, 2017
Merged
Conversation
binarywang
reviewed
Apr 19, 2017
| @@ -1,5 +1,7 @@ | |||
| package com.github.binarywang.wxpay.service.impl; | |||
| @@ -384,6 +376,7 @@ private String post(String url, String xmlParam) { | |||
|
|
|||
| /** | |||
| * 由于暂时未找到使用jodd-http实现证书配置的办法,故而暂时使用httpclient | |||
Owner
There was a problem hiding this comment.
注释能否修正一下?既然已经使用jodd-http实现了,上面的注释就显得无用了吧
| } | ||
| HttpRequest request =HttpRequest.post(url).withConnectionProvider(new SSLSocketHttpConnectionProvider(sslContext)); | ||
| request.bodyText(requestStr); | ||
| HttpResponse response =request.send(); |
| } finally { | ||
| httpPost.releaseConnection(); | ||
| } | ||
| HttpRequest request =HttpRequest.post(url).withConnectionProvider(new SSLSocketHttpConnectionProvider(sslContext)); |
Author
|
已格式化代码,再看下 |
Author
|
无用的注释已去掉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1、pay模块使用jodd-http方式,已支持证书方式
2、使用证书的方式和httpclient一样,都是通过java.net.ssl.SSLContext获取机器中的证书