Add X-Requested-With to server test
This commit is contained in:
parent
6cc4032d18
commit
519cfacaf2
1 changed files with 4 additions and 1 deletions
|
@ -65,7 +65,10 @@ type Client struct {
|
|||
|
||||
func NewClient(url string) *Client {
|
||||
url = strings.TrimRight(url, "/")
|
||||
return &Client{url, url + API_URL_SUFFIX, &http.Client{}, map[string]string{}}
|
||||
headers := map[string]string{
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
}
|
||||
return &Client{url, url + API_URL_SUFFIX, &http.Client{}, headers}
|
||||
}
|
||||
|
||||
func (c *Client) DoApiGet(url string, etag string) (*http.Response, error) {
|
||||
|
|
Loading…
Reference in a new issue