mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: use application/x-ndjson content type for multisearch requests (#32282)
This commit is contained in:
@@ -184,7 +184,7 @@ func (c *baseClientImpl) executeRequest(method, uriPath, uriQuery string, body [
|
||||
}
|
||||
|
||||
req.Header.Set("User-Agent", "Grafana")
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("Content-Type", "application/x-ndjson")
|
||||
|
||||
if c.ds.BasicAuth {
|
||||
clientLog.Debug("Request configured to use basic authentication")
|
||||
|
||||
@@ -366,7 +366,7 @@ func httpClientScenario(t *testing.T, desc string, ds *models.DataSource, fn sce
|
||||
|
||||
sc.requestBody = bytes.NewBuffer(buf)
|
||||
|
||||
rw.Header().Set("Content-Type", "application/json")
|
||||
rw.Header().Set("Content-Type", "application/x-ndjson")
|
||||
_, err = rw.Write([]byte(sc.responseBody))
|
||||
require.NoError(t, err)
|
||||
rw.WriteHeader(sc.responseStatus)
|
||||
|
||||
Reference in New Issue
Block a user