diff options
author | Yarin Dekel <yarind@amdocs.com> | 2018-10-16 12:11:13 +0300 |
---|---|---|
committer | Yarin Dekel <yarind@amdocs.com> | 2018-10-16 12:11:58 +0300 |
commit | cf2c2d8a4eb63e76ecb916fda608b6c39d0d47ca (patch) | |
tree | e72c2717d6d2b5dfbe9508480a67e47c4b2e8c7c /workflow-designer-ui/src/main | |
parent | 610abc68c8ba0ff9e589295e8646960951b2dc2e (diff) |
fix rest API header UI1.3.0
Issue-ID: SDC-1838
Change-Id: Idc02f6df489c8237a6b1c34d18ef3d2d0819f3b6
Signed-off-by: Yarin Dekel <yarind@amdocs.com>
Diffstat (limited to 'workflow-designer-ui/src/main')
-rw-r--r-- | workflow-designer-ui/src/main/frontend/src/services/restAPIUtil.js | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/workflow-designer-ui/src/main/frontend/src/services/restAPIUtil.js b/workflow-designer-ui/src/main/frontend/src/services/restAPIUtil.js index d5c0f9b0..05c0d799 100644 --- a/workflow-designer-ui/src/main/frontend/src/services/restAPIUtil.js +++ b/workflow-designer-ui/src/main/frontend/src/services/restAPIUtil.js @@ -34,11 +34,6 @@ const POST = 'POST'; const PUT = 'PUT'; const DELETE = 'DELETE'; const PATCH = 'PATCH'; - -// content-types -const APPLICATION_JSON = 'application/json'; -const MULTIPART_FORM_DATA = 'multipart/form-data'; - const BINARY = 'binary'; const AUTHORIZATION_HEADER = 'X-AUTH-TOKEN'; @@ -89,19 +84,9 @@ function handleSuccess(responseHeaders, requestHeaders) { } class RestAPIUtil { - async handleRequest(url, type, options = {}, data) { + async handleRequest(url, type, options = {}, data = {}) { applySecurity(options, data); - // TODO see ig necessary or in transformrequest funtion - if (type === POST || type === PUT || type === PATCH) { - options.headers.contentType = - data instanceof FormData - ? MULTIPART_FORM_DATA - : APPLICATION_JSON; - } else { - data = null; - } - let config = { method: type, url: url, |