1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-07 23:16:47 +00:00

refactor(manager): command pulling to command pushing and tests

这个提交包含在:
walkerning
2016-04-26 12:01:34 +08:00
提交者 bigeagle
父节点 734826fa67
当前提交 daa0b3c204
共有 5 个文件被更改,包括 119 次插入75 次删除

13
manager/util.go 普通文件
查看文件

@@ -0,0 +1,13 @@
package manager
import (
"bytes"
"encoding/json"
"net/http"
)
func postJSON(url string, obj interface{}) (*http.Response, error) {
b := new(bytes.Buffer)
json.NewEncoder(b).Encode(obj)
return http.Post(url, "application/json; charset=utf-8", b)
}