diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-04-19 11:45:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 11:45:01 +0800 |
commit | 2eeae84cbd80544157a82c7f031489eaaceaa873 (patch) | |
tree | a275f41a3bb552df39724d4eca3dcdffe47dff8f /modules/httplib/httplib.go | |
parent | f42ec6120e8a2830407027020b65391ebf8e7f59 (diff) | |
download | gitea-2eeae84cbd80544157a82c7f031489eaaceaa873.tar.gz gitea-2eeae84cbd80544157a82c7f031489eaaceaa873.zip |
Add internal routes for ssh hook comands (#1471)
* add internal routes for ssh hook comands
* fix lint
* add comment on why package named private not internal but the route name is internal
* add comment above package private why package named private not internal but the route name is internal
* remove exp time on internal access
* move routes from /internal to /api/internal
* add comment and defer on UpdatePublicKeyUpdated
Diffstat (limited to 'modules/httplib/httplib.go')
-rw-r--r-- | modules/httplib/httplib.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/httplib/httplib.go b/modules/httplib/httplib.go index 38b55e64e4..f2d9a2bfaa 100644 --- a/modules/httplib/httplib.go +++ b/modules/httplib/httplib.go @@ -62,6 +62,11 @@ func newRequest(url, method string) *Request { return &Request{url, &req, map[string]string{}, map[string]string{}, defaultSetting, &resp, nil} } +// NewRequest returns *Request with specific method +func NewRequest(url, method string) *Request { + return newRequest(url, method) +} + // Get returns *Request with GET method. func Get(url string) *Request { return newRequest(url, "GET") |