Class WebhookPoster

java.lang.Object
io.jenkins.plugins.interactiveinput.notify.WebhookPoster

public final class WebhookPoster extends Object
POSTs a JSON body to an incoming-webhook URL. http/https only; never logs the URL (it contains a secret) or the response body. Uses ProxyConfiguration.newHttpClient() so the controller proxy is honoured. Not a Stapler object — no do* methods.
  • Method Details

    • postJson

      public static void postJson(@NonNull String webhookUrl, @NonNull String json)
      POST json to webhookUrl. Failures are logged; this method does not throw.
      Parameters:
      webhookUrl - the incoming-webhook URL from a Secret-text credential (never logged)
      json - JSON object body