diff options
author | richarv <richard.vondadelszen@amdocs.com> | 2018-01-18 16:03:12 -0500 |
---|---|---|
committer | richarv <richard.vondadelszen@amdocs.com> | 2018-01-18 16:04:20 -0500 |
commit | 9f9553bdf90db2a02a742c4e038b2c1600c96036 (patch) | |
tree | aed559460d9255d231731aff6bcd69797b5b3505 /src/app/networking/NetworkCalls.js | |
parent | fd2a6b124c62fe186364efd8eb28409ce7507902 (diff) |
Handling new BE subscription payload
Issue-ID: AAI-676
Change-Id: I5c6307f43b20487068bc4ba3b6d9fee5b25e2027
Signed-off-by: richarv <richard.vondadelszen@amdocs.com>
Diffstat (limited to 'src/app/networking/NetworkCalls.js')
-rw-r--r-- | src/app/networking/NetworkCalls.js | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/app/networking/NetworkCalls.js b/src/app/networking/NetworkCalls.js index b6c96b7..003e69d 100644 --- a/src/app/networking/NetworkCalls.js +++ b/src/app/networking/NetworkCalls.js @@ -21,9 +21,6 @@ * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -function EmptyResponseException(){ - this.name = 'EmptyResponseException'; -} function fetchRequest(URL, POST, POST_HEADER, BODY) { return fetch(URL, { credentials: 'same-origin', @@ -44,27 +41,13 @@ function fetchRequestObj(URL, POST, POST_HEADER, BODY) { }); } -function processResponse(response){ - if(response.status === 204){ - throw new EmptyResponseException(); - } - return response.json(); -} function getRequest(URL, GET) { return fetch(URL, { credentials: 'same-origin', method: GET - }).then( - (response) => { - try{ - response.json(); - } catch (e){ - response.isValidJson = false; - } - return processResponse(response); - } - ); + }); } + module.exports = { fetchRequest: fetchRequest, fetchRequestObj: fetchRequestObj, |