Skip to content

Commit

Permalink
♻️ refactor: refactor codebase #2
Browse files Browse the repository at this point in the history
  • Loading branch information
pnguyen215 committed Jun 22, 2024
1 parent 3b225a3 commit c6ad230
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions plugin/src/main/groovy/org/bot4j/slack/common/Slack4j.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public WrapResponse<?> sendMessage() {
Map<String, Object> request = this.messageBody();
Map<String, String> headers = this.headers();
if (this.connections.isDebugging()) {
logger.debug("Slack4j, request_id: {} sending message on URL: {}", this.options.getRequestId(), url);
logger.debug("Slack4j, request_id: {} sending request body: {}", this.options.getRequestId(), Json4j.toJson(request));
logger.debug("Slack4j, request_id: {} sending request header: {}", this.options.getRequestId(), headers.toString());
this.logger.info("Slack4j, request_id: {} sending message on URL: {}", this.options.getRequestId(), url);
this.logger.info("Slack4j, request_id: {} sending request body: {}", this.options.getRequestId(), Json4j.toJson(request));
this.logger.info("Slack4j, request_id: {} sending request header: {}", this.options.getRequestId(), headers.toString());
}
try {
HttpResponse<JsonNode> caller = Unirest.post(url).headers(headers).body(request).asJson();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public WrapResponse<?> sendMessage() {
Map<String, Object> request = this.messageBody();
Map<String, String> headers = this.headers();
if (this.connections.isDebugging()) {
logger.debug("Telegram4j, request_id: {} sending message on URL: {}", this.options.getRequestId(), url);
logger.debug("Telegram4j, request_id: {} sending request body: {}", this.options.getRequestId(), Json4j.toJson(request));
logger.debug("Telegram4j, request_id: {} sending request header: {}", this.options.getRequestId(), headers.toString());
this.logger.info("Telegram4j, request_id: {} sending message on URL: {}", this.options.getRequestId(), url);
this.logger.info("Telegram4j, request_id: {} sending request body: {}", this.options.getRequestId(), Json4j.toJson(request));
this.logger.info("Telegram4j, request_id: {} sending request header: {}", this.options.getRequestId(), headers.toString());
}
try {
HttpResponse<JsonNode> caller = Unirest.post(url).headers(headers).body(request).asJson();
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/main/groovy/org/bot4j/viber/common/Viber4j.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ public WrapResponse<?> sendMessage() {
Map<String, Object> request = this.messageBody();
Map<String, String> headers = this.headers();
if (this.connections.isDebugging()) {
logger.debug("Viber4j, request_id: {} sending message on URL: {}", this.options.getRequestId(), url);
logger.debug("Viber4j, request_id: {} sending request body: {}", this.options.getRequestId(), Json4j.toJson(request));
logger.debug("Viber4j, request_id: {} sending request header: {}", this.options.getRequestId(), headers.toString());
this.logger.info("Viber4j, request_id: {} sending message on URL: {}", this.options.getRequestId(), url);
this.logger.info("Viber4j, request_id: {} sending request body: {}", this.options.getRequestId(), Json4j.toJson(request));
this.logger.info("Viber4j, request_id: {} sending request header: {}", this.options.getRequestId(), headers.toString());
}
try {
HttpResponse<JsonNode> caller = Unirest.post(url).headers(headers).body(request).asJson();
Expand Down

0 comments on commit c6ad230

Please sign in to comment.