public WebhookResponse send ( String url , Payload payload ) throws IOException { SlackHttpClient httpClient = getHttpClient ( ) ; Response httpResponse = httpClient . postJsonPostRequest ( url , payload ) ; String body = httpResponse . body ( ) . string ( ) ; httpClient . runHttpResponseListeners ( httpResponse , body ) ; return WebhookResponse . builder ( ) . code ( httpResponse . code ( ) ) . message ( httpResponse . message ( ) ) . body ( body ) . build ( ) ; }
Send a data to Incoming Webhook endpoint .