aofei / air

An ideally refined web framework for Go.
https://pkg.go.dev/github.com/aofei/air
MIT License
441 stars 37 forks source link

Support for OPTIONS & HEAD? #5

Closed LouisStAmour closed 6 years ago

LouisStAmour commented 7 years ago
aofei commented 7 years ago

I need to explain why I abandoned HEAD and OPTIONS.

In fact, I don't really want to abandon them, but want to merge them into GET. Why? Because HEAD and OPTIONS are just the same as GET to get some information from the server.

My current solution is to add a custom HTTP request header to achieve the goal. Like Without-Body: true used to tell the server to discard the response body. But I didn't finalize the solution. So welcome everyone to put forward their own views.