Open ccoverstreet opened 2 years ago
Right now, all handlers receive a *http.Request. This means that there is a lot of repeated code for extracting the data for each handler. A better method would be to pass a []byte to each handler with the handler's Unmarshalling the JSON.
*http.Request
[]byte
Right now, all handlers receive a
*http.Request
. This means that there is a lot of repeated code for extracting the data for each handler. A better method would be to pass a[]byte
to each handler with the handler's Unmarshalling the JSON.