Use API v1.11

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com> (github: aanand)
This commit is contained in:
Aanand Prasad 2014-06-05 15:55:15 -07:00 committed by Solomon Hykes
parent 16036ec994
commit 36c58f3534
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func Forward() beam.Sender {
if len(ctx.Args) != 1 {
return fmt.Errorf("forward: spawn takes exactly 1 argument, got %d", len(ctx.Args))
}
client, err := newClient(ctx.Args[0], "v0.10")
client, err := newClient(ctx.Args[0], "v1.11")
if err != nil {
return fmt.Errorf("%v", err)
}
@ -193,6 +193,7 @@ func newClient(peer, version string) (*client, error) {
}
func (c *client) call(method, path, body string) (*http.Response, error) {
path = fmt.Sprintf("/%s%s", c.version, path)
u, err := url.Parse(path)
if err != nil {
return nil, err
@ -211,6 +212,7 @@ func (c *client) call(method, path, body string) (*http.Response, error) {
}
func (c *client) hijack(method, path string, in io.ReadCloser, stdout, stderr io.Writer) error {
path = fmt.Sprintf("/%s%s", c.version, path)
dial, err := net.Dial("tcp", c.URL.Host)
if err != nil {
return err