This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ============================================================================= | |
# Author: Chu-Siang Lai / chusiang (at) drx.tw | |
# Filename: teams-chat-post.sh | |
# Modified: 2021-10-18 00:09 | |
# Description: Post a message to Microsoft Teams. | |
# Reference: | |
# | |
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Usage: | |
groovy webServer.groovy [-Pport=80] [-PwebRoot=/path/to/files] | |
* | |
* Or with gradle, place in src/main/groovy, and place assets in src/main/webapp | |
* and use as the mainClassName. | |
*/ | |
import com.sun.net.httpserver.* | |
// only supports basic web content types |