summaryrefslogtreecommitdiffstats
path: root/modules/httplib/httplib.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-04-19 11:45:01 +0800
committerGitHub <noreply@github.com>2017-04-19 11:45:01 +0800
commit2eeae84cbd80544157a82c7f031489eaaceaa873 (patch)
treea275f41a3bb552df39724d4eca3dcdffe47dff8f /modules/httplib/httplib.go
parentf42ec6120e8a2830407027020b65391ebf8e7f59 (diff)
downloadgitea-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.go5
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")