Skip to content

Commit

Permalink
Add Content-Type header to COPY AS CURL
Browse files Browse the repository at this point in the history
Adds the `Content-Type: application/json` header to the curl
request generated by the `COPY AS CURL` links if the request
has a body.

Closes elastic#143
  • Loading branch information
nik9000 committed Jan 20, 2017
1 parent 921a5ba commit bff2814
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions resources/web/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ jQuery(function() {
if (body) {
body = body.replace(/\'/g, '\\u0027');
body = body.replace(/\s*$/,"\n");
curlText += " -H 'Content-Type: application/json'";
curlText += " -d'" + body + "'";
}
curlText += '\n';
Expand Down

0 comments on commit bff2814

Please sign in to comment.