about summary refs log tree commit diff stats
path: root/vimrc.vim
Commit message (Collapse)AuthorAgeFilesLines
* 1276 - make C++ version the defaultKartik K. Agaram2015-05-051-6/+34
| | | | I've tried to update the Readme, but there are at least a couple of issues.
* 1150Kartik K. Agaram2015-04-231-1/+0
|
* 1093 - little more vim support for the old arc versionKartik K. Agaram2015-04-171-0/+8
|
* 744 - test cursor movement in trace browserKartik K. Agaram2015-02-111-0/+1
Don't prevent run-code from clobbering existing functions, but warn because it makes traces easier to read if the different sections of a test can be distinguished.
s/diff/?h=v0.6.2&id=813b37d0cf7e6e371418feac56d40f48176105ba'>Diffstat (limited to 'pkg/request/req.go')
-rw-r--r--pkg/request/req.go44
1 files changed, 0 insertions, 44 deletions
diff --git a/pkg/request/req.go b/pkg/request/req.go
deleted file mode 100644
index 350f5f6..0000000
--- a/pkg/request/req.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package request
-
-import (
-	"fmt"
-	"io/ioutil"
-	"net/http"
-	"time"
-)
-
-// GetRes returns api response
-func GetRes(api string, params map[string]string) (string, error) {
-	c := http.Client{
-		// TODO: timeout should be configurable by the user
-		Timeout: time.Second * 64,
-	}
-
-	req, err := http.NewRequest(http.MethodGet, api, nil)
-	if err != nil {
-		return "", err
-	}
-
-	q := req.URL.Query()
-	for k, v := range params {
-		q.Add(k, v)
-	}
-	req.URL.RawQuery = q.Encode()
-
-	res, err := c.Do(req)
-	if err != nil {
-		return "", err
-	}
-	defer res.Body.Close()
-
-	if res.StatusCode != 200 {
-		return "", fmt.Errorf("Unexpected response status code received: %d %s",
-			res.StatusCode, http.StatusText(res.StatusCode))
-	}
-
-	body, err := ioutil.ReadAll(res.Body)
-	if err != nil {
-		return "", err
-	}
-	return string(body), err
-}