Skip to content

Commit

Permalink
Client: Add a helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
e3ndr committed Mar 19, 2024
1 parent cd4705c commit f3fbc1f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ public class LogStrudel {
private String lsUrl;
private String lsToken;

public void tryPublish(@NonNull Line line) {
try {
this.publish(line);
} catch (IOException | InterruptedException | LinePublishingException ignored) {}
}

public void publish(@NonNull Line line) throws IOException, InterruptedException, LinePublishingException {
JsonObject response = httpClient.send(
HttpRequest.newBuilder()
Expand Down

0 comments on commit f3fbc1f

Please sign in to comment.