mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[console] Add content-type when using copy as curl (#10224)
Backports PR #10086
**Commit 1:**
[console] Add content-type when using copy as curl
* Original sha: a23ae3bc3f
* Authored by Jonathan Budzenski <jon@jbudz.me> on 2017-01-26T22:27:39Z
This commit is contained in:
parent
9ed7e81b62
commit
4d1e3129fb
2 changed files with 2 additions and 2 deletions
|
@ -546,7 +546,7 @@ function SenseEditor($el) {
|
|||
|
||||
var ret = 'curl -X' + es_method + ' "' + url + '"';
|
||||
if (es_data && es_data.length) {
|
||||
ret += " -d'\n";
|
||||
ret += " -H 'Content-Type: application/json' -d'\n";
|
||||
var data_as_string = utils.collapseLiteralStrings(es_data.join("\n"))
|
||||
// since Sense doesn't allow single quote json string any single qoute is within a string.
|
||||
ret += data_as_string.replace(/'/g, '\\"');
|
||||
|
|
|
@ -386,7 +386,7 @@ curl -XGET "http://localhost:9200/_stats?level=shards"
|
|||
|
||||
#in between comment
|
||||
|
||||
curl -XPUT "http://localhost:9200/index_1/type1/1" -d'
|
||||
curl -XPUT "http://localhost:9200/index_1/type1/1" -H 'Content-Type: application/json' -d'
|
||||
{
|
||||
"f": 1
|
||||
}'`.trim()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue