#reminder
2 catatan
105 view
Mon, 30 Mar 2015 8:11 am
Fri, 27 Mar 2015 10:29 am
To handle different methods differently: Many of my HTTP handlers contain nothing but a switch statement like this:
switch r.Method { case "GET": // Serve the resource. case "POST": // Create a new record. case "PUT": // Update an existing record. case "DELETE": // Remove the record. default: // Give an error message. }#go #stackoverflow #reminder