Commit 7c3eb1a5 authored by Liang Ding's avatar Liang Ding

Fix #12738

parent a8cd4236
......@@ -48,7 +48,7 @@ import org.json.JSONObject;
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://hacpai.com/member/armstrong">ArmstrongCN</a>
* @version 1.0.2.18, Feb 21, 2019
* @version 1.0.2.19, Mar 27, 2019
* @since 0.3.1
*/
@Singleton
......@@ -124,7 +124,7 @@ public class B3ArticleSender extends AbstractEventListener<JSONObject> {
put("article", article).
put("client", client);
final HttpResponse response = HttpRequest.post("https://rhythm.b3log.org/api/article").bodyText(requestJSONObject.toString()).
connectionTimeout(3000).timeout(7000).
connectionTimeout(3000).timeout(7000).trustAllCerts(true).
contentTypeJson().header("User-Agent", Solos.USER_AGENT).send();
LOGGER.log(Level.INFO, "Pushed an article [title={0}] to Rhy, response [{1}]", title, response.toString());
......
......@@ -43,7 +43,7 @@ import org.json.JSONObject;
* This listener is responsible for sending comment to B3log Rhythm. Sees <a href="https://hacpai.com/b3log">B3log 构思</a> for more details.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.5, Feb 9, 2019
* @version 1.0.1.6, Mar 27, 2019
* @since 0.5.5
*/
@Singleton
......@@ -116,6 +116,7 @@ public class B3CommentSender extends AbstractEventListener<JSONObject> {
put("client", client);
HttpRequest.post("https://rhythm.b3log.org/api/comment").bodyText(requestJSONObject.toString()).
connectionTimeout(3000).timeout(7000).trustAllCerts(true).
header("User-Agent", Solos.USER_AGENT).contentTypeJson().sendAsync();
LOGGER.log(Level.DEBUG, "Pushed a comment to Sym");
} catch (final Exception e) {
......
......@@ -53,7 +53,7 @@ import java.util.stream.Collectors;
* Export service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.0.3, Mar 19, 2019
* @version 1.1.0.4, Mar 27, 2019
* @since 2.5.0
*/
@Service
......@@ -240,7 +240,8 @@ public class ExportService {
bodyBuilder.append("### 热议\n").append(mostCmtBuilder);
}
final HttpResponse response = HttpRequest.post("https://hacpai.com/github/repos").connectionTimeout(7000).timeout(60000).header("User-Agent", Solos.USER_AGENT).
final HttpResponse response = HttpRequest.post("https://hacpai.com/github/repos").
connectionTimeout(7000).timeout(60000).trustAllCerts(true).header("User-Agent", Solos.USER_AGENT).
form("userName", userName,
"userB3Key", userB3Ke,
"clientName", "Solo",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment