Using the net/http i want a way to get the current request string and the method i.e. GET, POST, PUT etc.
Is this possible - i cant see it in the docs
Using the net/http i want a way to get the current request string and the method i.e. GET, POST, PUT etc.
Is this possible - i cant see it in the docs
You can use the following fields of the Request struct:
Method string
and
RequestURI string
I suggest you to look at the source code of the struct: Request struct source code
You can access it by clicking on the struct name in the go doc for the net/http package.