Skip to content

Commit

Permalink
Merge pull request #133 from JCHacking/fix_webhook_without_headers
Browse files Browse the repository at this point in the history
fix: Fix error with headers in webhook
  • Loading branch information
v1r3n authored May 26, 2024
2 parents 3e85e96 + ed47d7f commit 99958d2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ public void postNotification(
String url = prepareUrl(notifType, statusNotifier);

Map<String, String> headers = new HashMap<>();
headers.put(config.getHeaderPrefer(), config.getHeaderPreferValue());
if (config.getHeaderPrefer() != "" && config.getHeaderPreferValue() != "")
headers.put(config.getHeaderPrefer(), config.getHeaderPreferValue());

HttpPost request = createPostRequest(url, data, headers);
long start = System.currentTimeMillis();
Expand Down

0 comments on commit 99958d2

Please sign in to comment.