feishu.groovy 386 B

1234567891011121314
  1. #!/usr/bin/env groovy
  2. import groovy.json.JsonOutput
  3. def send(String webhook, Map card) {
  4. // 不带签名,直接发
  5. httpRequest(
  6. httpMode: 'POST',
  7. requestBody: JsonOutput.toJson([msg_type: 'interactive', card: card]),
  8. contentType: 'APPLICATION_JSON',
  9. url: webhook,
  10. consoleLogResponseBody: true,
  11. validResponseCodes: '200'
  12. )
  13. }