aerogo / aero

:bullettrain_side: High-performance web server for Go (2016). New alpha (2024) with even better performance is currently in development at https://git.akyoto.dev/go/web
MIT License
572 stars 33 forks source link

HTTP methods supported? #8

Closed peterljung closed 5 years ago

peterljung commented 5 years ago

Are only GET and POST methods supported by this framework?

I have used gorilla/mux for routing before and I end up with code like this:

r.HandleFunc("/api/accounts", AddAccount).Methods("POST")
r.HandleFunc("/api/accounts", GetAccounts).Methods("GET")
r.HandleFunc("/api/accounts/{key}", UpdateAccount).Methods("POST")
r.HandleFunc("/api/accounts/{key}", DeleteAccount).Methods("DELETE")

At least DELETE seems very useful in any REST like api.

akyoto commented 5 years ago

I have added the app.Delete routing method in 1.2.6.

Could you try to update your version with go get -u github.com/aerogo/aero?

peterljung commented 5 years ago

Thanks!