@elastic.io/component-commons-library
Advanced tools
Comparing version 3.0.3-dev.16 to 3.0.3-dev.17
{ | ||
"name": "@elastic.io/component-commons-library", | ||
"version": "3.0.3-dev.15", | ||
"version": "3.0.3-dev.17", | ||
"description": "Library for most common component development cases", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -45,3 +45,3 @@ "use strict"; | ||
method: 'GET', | ||
body: {}, | ||
data: {}, | ||
headers: {}, | ||
@@ -48,0 +48,0 @@ }; |
@@ -46,3 +46,3 @@ "use strict"; | ||
// method: HTTP verb to use | ||
// body: Body of the request, if applicable. Defaults to undefined. | ||
// data: Body of the request, if applicable. Defaults to undefined. | ||
// headers: Any HTTP headers to add to the request. Defaults to {} | ||
@@ -53,3 +53,3 @@ // urlIsSegment: Whether to append to the base server url or | ||
var _a, _b; | ||
const { url, method, body, headers = {}, urlIsSegment = true, } = options; | ||
const { url, method, data, headers = {}, urlIsSegment = true, } = options; | ||
const urlToCall = urlIsSegment | ||
@@ -62,3 +62,3 @@ ? `${(0, remove_trailing_slash_1.default)(this.cfg.resourceServerUrl.trim())}/${(0, remove_leading_slash_1.default)(url.trim())}` // Trim trailing or leading '/' | ||
url: urlToCall, | ||
data: body, | ||
data, | ||
headers, | ||
@@ -65,0 +65,0 @@ }; |
{ | ||
"name": "@elastic.io/component-commons-library", | ||
"version": "3.0.3-dev.16", | ||
"version": "3.0.3-dev.17", | ||
"description": "Library for most common component development cases", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -56,3 +56,3 @@ import http from 'http'; | ||
// method: HTTP verb to use | ||
// body: Body of the request, if applicable. Defaults to undefined. | ||
// data: Body of the request, if applicable. Defaults to undefined. | ||
// headers: Any HTTP headers to add to the request. Defaults to {} | ||
@@ -63,3 +63,3 @@ // urlIsSegment: Whether to append to the base server url or | ||
const { | ||
url, method, body, headers = {}, urlIsSegment = true, | ||
url, method, data, headers = {}, urlIsSegment = true, | ||
} = options; | ||
@@ -75,3 +75,3 @@ const urlToCall = urlIsSegment | ||
url: urlToCall, | ||
data: body, | ||
data, | ||
headers, | ||
@@ -78,0 +78,0 @@ }; |
260596