Always include the Accept: header in GET queries
This commit is contained in:
parent
a4f5e98f63
commit
62755427a2
|
@ -252,7 +252,7 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (xTransport *XTransport) Get(url *url.URL, accept string, timeout time.Duration) (*http.Response, time.Duration, error) {
|
func (xTransport *XTransport) Get(url *url.URL, accept string, timeout time.Duration) (*http.Response, time.Duration, error) {
|
||||||
return xTransport.Fetch("GET", url, "", "", nil, timeout, nil)
|
return xTransport.Fetch("GET", url, accept, "", nil, timeout, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (xTransport *XTransport) Post(url *url.URL, accept string, contentType string, body []byte, timeout time.Duration, padding *string) (*http.Response, time.Duration, error) {
|
func (xTransport *XTransport) Post(url *url.URL, accept string, contentType string, body []byte, timeout time.Duration, padding *string) (*http.Response, time.Duration, error) {
|
||||||
|
|
Loading…
Reference in New Issue