go-client icon indicating copy to clipboard operation
go-client copied to clipboard

POST unexpected EOF when using Create(zipOrDir)

Open barsanuphe opened this issue 7 years ago • 0 comments

I'm trying to create a new deploy for a site.

client := netlify.NewClient(&netlify.Config{AccessToken: "token"})
site, _, err := client.Sites.Get("site-id")
dep, resp, err := site.Deploys.Create("/path/to/dir")

site is correctly fetched and contains the relevant site info. The call to Create, however, hangs then gives the error:

Post https://api.netlify.com/api/v1/sites/site-id/deploys: unexpected EOF 

The error happens l131 of deploys.go:

resp, err := s.client.Request("POST", s.apiPath(), options, deploy)

This happens whether I'm trying to a zip or dir as source, since this part is before the library even looks at the files. Am I missing something? Thanks!

barsanuphe avatar Mar 12 '17 17:03 barsanuphe