2018-07-07 16:10:42 +00:00
|
|
|
package aicra
|
2018-07-06 08:49:52 +00:00
|
|
|
|
|
|
|
import (
|
2019-04-30 22:02:28 +00:00
|
|
|
"log"
|
2019-09-26 17:03:37 +00:00
|
|
|
"net/http"
|
2019-04-30 22:02:28 +00:00
|
|
|
|
2018-10-07 09:40:35 +00:00
|
|
|
"git.xdrm.io/go/aicra/api"
|
2018-07-06 08:49:52 +00:00
|
|
|
)
|
|
|
|
|
2019-09-26 17:03:37 +00:00
|
|
|
var handledMethods = []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete}
|
|
|
|
|
2018-07-06 08:49:52 +00:00
|
|
|
// Prints an error as HTTP response
|
2019-05-01 16:01:32 +00:00
|
|
|
func logError(res *api.Response) {
|
2019-05-01 16:23:57 +00:00
|
|
|
log.Printf("[http.fail] %v\n", res)
|
2018-07-06 08:49:52 +00:00
|
|
|
}
|