From 2eeae84cbd80544157a82c7f031489eaaceaa873 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 19 Apr 2017 11:45:01 +0800 Subject: 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 --- modules/httplib/httplib.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/httplib') 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") -- cgit v1.2.3