feat: support clients that send the API params as a x-www-form-urlencoded POST

This commit is contained in:
Deluan
2020-01-27 15:10:46 -05:00
parent cffae3a7d6
commit 1278863416
5 changed files with 77 additions and 18 deletions
+1
View File
@@ -45,6 +45,7 @@ func (api *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func (api *Router) routes() http.Handler {
r := chi.NewRouter()
r.Use(postFormToQueryParams)
r.Use(checkRequiredParameters)
// Add validation middleware if not disabled