diff --git a/jenkins.go b/jenkins.go index 91c536b..8e2d389 100644 --- a/jenkins.go +++ b/jenkins.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "log" "net/http" "net/url" "strings" @@ -81,7 +82,6 @@ func (jenkins *Jenkins) parseResponse(resp *http.Response, body interface{}) (er func (jenkins *Jenkins) post(path string, params url.Values, body interface{}) (err error) { requestURL := jenkins.buildURL(path, params) - // formData := params.Encode() req, err := http.NewRequest("POST", requestURL, nil) if err != nil { return @@ -124,5 +124,7 @@ func (jenkins *Jenkins) trigger(job string, params url.Values) error { urlPath = jenkins.parseJobPath(job) + "/buildWithParameters" } + log.Println(urlPath) + return jenkins.post(urlPath, params, nil) }