diff options
Diffstat (limited to 'pim/cmd/caldavfs/http.go')
| -rw-r--r-- | pim/cmd/caldavfs/http.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pim/cmd/caldavfs/http.go b/pim/cmd/caldavfs/http.go new file mode 100644 index 0000000..a49baf8 --- /dev/null +++ b/pim/cmd/caldavfs/http.go @@ -0,0 +1,14 @@ +package main + +import ( + "net/http" + "time" +) + +var client = &http.Client{Timeout: 2 * time.Minute} + +func newRequest(method, endpoint, path string) (*http.Request, error) { + return http.NewRequest(method, urlJoin(endpoint, path), nil) +} + +func httpDo(req *http.Request) (*http.Response, error) { return client.Do(req) } |
