mirror of
https://wiilab.wiimart.org/wiimart/WiiSOAP
synced 2025-09-05 21:11:02 +02:00
Better responses
This commit is contained in:
parent
89ec54ec66
commit
97f0ef435e
6
main.go
6
main.go
@ -110,7 +110,7 @@ type UNR struct {
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("Starting HTTP connection (Port 8000)...")
|
||||
fmt.Println("Starting HTTP connection (Port 80)...")
|
||||
http.HandleFunc("/", handler) // each request calls handler
|
||||
log.Fatal(http.ListenAndServe(":80", nil))
|
||||
}
|
||||
@ -119,9 +119,7 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Get a sexy new timestamp to use.
|
||||
timestampnano := strconv.FormatInt(time.Now().UTC().Unix(), 10)
|
||||
fmt.Println(timestampnano)
|
||||
timestamp := timestampnano + "000"
|
||||
fmt.Println(timestamp)
|
||||
|
||||
fmt.Println("-=Incoming request!=-")
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
@ -427,5 +425,5 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
}
|
||||
fmt.Println("-=End of Request.=-")
|
||||
fmt.Println("-=End of Request.=-"+"\n")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user