Skip to content

Instantly share code, notes, and snippets.

@cskonopka
Created March 6, 2019 17:53
Show Gist options
  • Save cskonopka/ed052f8892baf181261aeefc84882d7f to your computer and use it in GitHub Desktop.
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
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