updated post request code

This commit is contained in:
Zac 2018-08-28 14:13:20 -07:00 committed by Thomas Jackson
parent 0eac8fc5cf
commit f8f555d73a
1 changed files with 5 additions and 2 deletions

View File

@ -281,10 +281,13 @@ func updateSymlink(ctx context.Context, gitRoot, link, newDir string) error {
if len(*flSymlinkUpdatePostUrl) > 0 { if len(*flSymlinkUpdatePostUrl) > 0 {
log.V(0).Infof("sending post request to %s", *flSymlinkUpdatePostUrl) log.V(0).Infof("sending post request to %s", *flSymlinkUpdatePostUrl)
// Send the post request // Send the post request
_, err := http.NewRequest("POST", *flSymlinkUpdatePostUrl, nil) req, err := http.NewRequest("POST", *flSymlinkUpdatePostUrl, nil)
if err != nil { if err != nil {
return fmt.Errorf("error sending symlink update callback post request: %v", err) fmt.Errorf("error sending post request (after symlink update): %v", err)
} }
c := &http.Client{}
resp, err := c.Do(req)
resp.Body.Close()
} }
// Clean up previous worktree // Clean up previous worktree