Created
March 6, 2019 17:53
-
-
Save cskonopka/ed052f8892baf181261aeefc84882d7f to your computer and use it in GitHub Desktop.
Basic example of how to receive M2M webhooks from a SIM using a Go server
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/tester", tester) | |
http.ListenAndServe(":9999", nil) | |
} | |
func tester(w http.ResponseWriter, r *http.Request) { | |
pwCommand := r.PostFormValue("Command") | |
fmt.Println("incoming Command : ", pwCommand) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment