Merge pull request #1659 from soulseen/fix/struct_memory_address
fix jenkins request func parameters
This commit is contained in:
@@ -84,7 +84,7 @@ func (r *Requester) PostJSON(endpoint string, payload io.Reader, responseStruct
|
||||
}
|
||||
ar.SetHeader("Content-Type", "application/x-www-form-urlencoded")
|
||||
ar.Suffix = "api/json"
|
||||
return r.Do(ar, &responseStruct, querystring)
|
||||
return r.Do(ar, responseStruct, querystring)
|
||||
}
|
||||
|
||||
func (r *Requester) Post(endpoint string, payload io.Reader, responseStruct interface{}, querystring map[string]string) (*http.Response, error) {
|
||||
@@ -94,7 +94,7 @@ func (r *Requester) Post(endpoint string, payload io.Reader, responseStruct inte
|
||||
}
|
||||
ar.SetHeader("Content-Type", "application/x-www-form-urlencoded")
|
||||
ar.Suffix = ""
|
||||
return r.Do(ar, &responseStruct, querystring)
|
||||
return r.Do(ar, responseStruct, querystring)
|
||||
}
|
||||
func (r *Requester) PostForm(endpoint string, payload io.Reader, responseStruct interface{}, formString map[string]string) (*http.Response, error) {
|
||||
ar := NewAPIRequest("POST", endpoint, payload)
|
||||
@@ -103,7 +103,7 @@ func (r *Requester) PostForm(endpoint string, payload io.Reader, responseStruct
|
||||
}
|
||||
ar.SetHeader("Content-Type", "application/x-www-form-urlencoded")
|
||||
ar.Suffix = ""
|
||||
return r.DoPostForm(ar, &responseStruct, formString)
|
||||
return r.DoPostForm(ar, responseStruct, formString)
|
||||
}
|
||||
|
||||
func (r *Requester) PostFiles(endpoint string, payload io.Reader, responseStruct interface{}, querystring map[string]string, files []string) (*http.Response, error) {
|
||||
@@ -111,7 +111,7 @@ func (r *Requester) PostFiles(endpoint string, payload io.Reader, responseStruct
|
||||
if err := r.SetCrumb(ar); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return r.Do(ar, &responseStruct, querystring, files)
|
||||
return r.Do(ar, responseStruct, querystring, files)
|
||||
}
|
||||
|
||||
func (r *Requester) PostXML(endpoint string, xml string, responseStruct interface{}, querystring map[string]string) (*http.Response, error) {
|
||||
@@ -122,14 +122,14 @@ func (r *Requester) PostXML(endpoint string, xml string, responseStruct interfac
|
||||
}
|
||||
ar.SetHeader("Content-Type", "application/xml;charset=utf-8")
|
||||
ar.Suffix = ""
|
||||
return r.Do(ar, &responseStruct, querystring)
|
||||
return r.Do(ar, responseStruct, querystring)
|
||||
}
|
||||
|
||||
func (r *Requester) GetJSON(endpoint string, responseStruct interface{}, query map[string]string) (*http.Response, error) {
|
||||
ar := NewAPIRequest("GET", endpoint, nil)
|
||||
ar.SetHeader("Content-Type", "application/json")
|
||||
ar.Suffix = "api/json"
|
||||
return r.Do(ar, &responseStruct, query)
|
||||
return r.Do(ar, responseStruct, query)
|
||||
}
|
||||
|
||||
func (r *Requester) GetXML(endpoint string, responseStruct interface{}, query map[string]string) (*http.Response, error) {
|
||||
|
||||
Reference in New Issue
Block a user