aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYarin Dekel <yarind@amdocs.com>2018-10-16 10:42:49 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-10-16 12:51:42 +0000
commitbc20534de90f17f2215309af6fe986e899c98fa5 (patch)
treecc74545f71270e552f0c6ba9c6d68b2fe714fff8
parent38eaa811520ec89cb72ae8d779739484ac3f3559 (diff)
fix rest API headers UI
Issue-ID: SDC-1837 Change-Id: I3ae3a849e3066f41fc6fbaf118823452ada75ee3 Signed-off-by: Yarin Dekel <yarind@amdocs.com>
-rw-r--r--openecomp-ui/src/nfvo-utils/RestAPIUtil.js19
1 files changed, 1 insertions, 18 deletions
diff --git a/openecomp-ui/src/nfvo-utils/RestAPIUtil.js b/openecomp-ui/src/nfvo-utils/RestAPIUtil.js
index a8b40d32a6..66d7c6d4fd 100644
--- a/openecomp-ui/src/nfvo-utils/RestAPIUtil.js
+++ b/openecomp-ui/src/nfvo-utils/RestAPIUtil.js
@@ -27,11 +27,6 @@ const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const DELETE = 'DELETE';
-
-// content-types
-const APPLICATION_JSON = 'application/json';
-const MULTIPART_FORM_DATA = 'multipart/form-data';
-
const BINARY = 'binary';
const AUTHORIZATION_HEADER = 'X-AUTH-TOKEN';
@@ -78,21 +73,9 @@ function handleSuccess(responseHeaders, requestHeaders) {
}
class RestAPIUtil {
- handleRequest(url, type, options = {}, data) {
+ handleRequest(url, type, options = {}, data = {}) {
applySecurity(options, data);
- // TODO see ig necessary or in transformrequest funtion
- if (type === POST || type === PUT) {
- if (data instanceof FormData) {
- options.headers.contentType = MULTIPART_FORM_DATA;
- } else {
- options.headers.contentType = APPLICATION_JSON;
- // config.data = JSON.stringify(data);
- }
- } else {
- data = null;
- }
-
let config = {
method: type,
url: url,