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
This commit is contained in:
parent
d41b31db4d
commit
a23ae3bc3f
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