aboutsummaryrefslogtreecommitdiffstats
path: root/timetask/http_test.go
diff options
context:
space:
mode:
authorTeddy Wing2017-03-11 08:33:39 +0100
committerTeddy Wing2017-03-11 08:33:39 +0100
commitd14b4bb9be46396843c346b468dada938364c25b (patch)
tree8952bc2695f80487628122d7f5d238a5827cc1ed /timetask/http_test.go
downloadtimetasker-d14b4bb9be46396843c346b468dada938364c25b.tar.bz2
Initial commit. Test HTTP request.
Make a sample GET request using `net/http`.
Diffstat (limited to 'timetask/http_test.go')
-rw-r--r--timetask/http_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/timetask/http_test.go b/timetask/http_test.go
new file mode 100644
index 0000000..7adf2c4
--- /dev/null
+++ b/timetask/http_test.go
@@ -0,0 +1,14 @@
+package timetask
+
+import (
+ "io/ioutil"
+ "testing"
+)
+
+func TestLogin(t *testing.T) {
+ response, _ := Login()
+ defer response.Body.Close()
+ body, _ := ioutil.ReadAll(response.Body)
+ t.Log(response)
+ t.Logf("%s", body)
+}