Produced by Araxis Merge on 4/2/2019 1:07:33 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\ARS_Frontend\ars-app\fpps-app-server\server\rest | fpps-rest.js | Wed Mar 27 19:16:13 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Frontend\ars-app\fpps-app-server\server\rest | fpps-rest.js | Fri Mar 29 17:53:53 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 270 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | const fs = require(' fs'); | |
2 | const path = require ('path'); | |
3 | var Client = require ('node-res t-client') .Client; | |
4 | var client = new Cli ent({ | |
5 | connecti on: { | |
6 | ca: fs .readFileS ync( | |
7 | path .join('ssl -certs/va- ca-cert/', 'VA-Inter nal-CHAINE D.crt') | |
8 | ) | |
9 | } | |
10 | }); | |
11 | const auth = require ('./../aut h/auth'); | |
12 | ||
13 | module.exp orts.fppsG etResource = functio n(url, bod y) { | |
14 | return n ew Promise (function( resolve, r eject) { | |
15 | auth | |
16 | .get AccessToke n() | |
17 | .the n(access_t oken => { | |
18 | va r args = { | |
19 | headers: { | |
20 | Authoriz ation: acc ess_token. toString(' utf-8'), | |
21 | 'Content -Type': 'a pplication /json' | |
22 | }, | |
23 | data: {} | |
24 | }; | |
25 | re solve( | |
26 | new Promis e(function (resolve, reject) { | |
27 | client.g et(url, ar gs, functi on(respons eBody, res ponse) { | |
28 | resolv e({ respon seBody, re sponse }); | |
29 | }); | |
30 | }) | |
31 | ); | |
32 | }) | |
33 | .cat ch(error = > console. log('getRe source res t.js ', er ror)); | |
34 | }); | |
35 | }; | |
36 | ||
37 | module.exp orts.fppsP ostResourc e = functi on(url, bo dy) { | |
38 | return n ew Promise (function( resolve, r eject) { | |
39 | auth | |
40 | .get AccessToke n() | |
41 | .the n(access_t oken => { | |
42 | va r args = { | |
43 | headers: { | |
44 | Authoriz ation: acc ess_token. toString(' utf-8'), | |
45 | 'Content -Type': 'a pplication /json' | |
46 | }, | |
47 | data: body | |
48 | }; | |
49 | re solve( | |
50 | new Promis e(function (resolve, reject) { | |
51 | client.p ost(url, a rgs, funct ion(respon seBody, re sponse) { | |
52 | resolv e({ respon seBody, re sponse }); | |
53 | }); | |
54 | }) | |
55 | ); | |
56 | }) | |
57 | .cat ch(error = > console. log('postR esource re st.js ', e rror)); | |
58 | }); | |
59 | }; | |
60 | ||
61 | module.exp orts.fppsP utResource = functio n(url, bod y) { | |
62 | return n ew Promise (function( resolve, r eject) { | |
63 | auth | |
64 | .get AccessToke n() | |
65 | .the n(access_t oken => { | |
66 | va r args = { | |
67 | headers: { | |
68 | Authoriz ation: acc ess_token. toString(' utf-8'), | |
69 | 'Content -Type': 'a pplication /json' | |
70 | // 'Cach e-control' : 'no-cach e, no-stor e', | |
71 | // Pragm a: 'no-cac he', | |
72 | // Expir es: 'Sat 0 1 Jan 2000 00:00:00 GMT' | |
73 | }, | |
74 | data: body | |
75 | }; | |
76 | re solve( | |
77 | new Promis e(function (resolve, reject) { | |
78 | client.p ut(url, ar gs, functi on(respons eBody, res ponse) { | |
79 | resolv e({ respon seBody, re sponse }); | |
80 | }); | |
81 | }) | |
82 | ); | |
83 | }) | |
84 | .cat ch(error = > console. log('putRe source res t.js ', er ror)); | |
85 | }); | |
86 | }; | |
87 | module.exp orts.fppsD eleteResou rce = func tion(url, body) { | |
88 | return n ew Promise (function( resolve, r eject) { | |
89 | auth | |
90 | .get AccessToke n() | |
91 | .the n(access_t oken => { | |
92 | va r args = { | |
93 | headers: { | |
94 | Authoriz ation: acc ess_token. toString(' utf-8'), | |
95 | 'Content -Type': 'a pplication /json' | |
96 | }, | |
97 | data: body | |
98 | }; | |
99 | re solve( | |
100 | new Promis e(function (resolve, reject) { | |
101 | client.d elete(url, args, fun ction(resp onseBody, response) { | |
102 | resolv e({ respon seBody, re sponse }); | |
103 | }); | |
104 | }) | |
105 | ); | |
106 | }) | |
107 | .cat ch(error = > console. log('delet eResource rest.js ', error)); | |
108 | }); | |
109 | }; | |
110 | // For res t calls th at needs t o pass gui d | |
111 | module.exp orts.fppsG etResource 2 = functi on(url, us erName) { | |
112 | return n ew Promise (function( resolve, r eject) { | |
113 | auth | |
114 | .get AccessToke n() | |
115 | .the n(access_t oken => { | |
116 | va r args = { | |
117 | headers: { | |
118 | Authoriz ation: acc ess_token. toString(' utf-8'), | |
119 | 'Content -Type': 'a pplication /json' | |
120 | }, | |
121 | parameters : { | |
122 | userName: AI | |
123 | }, | |
124 | data: {} | |
125 | }; | |
126 | re solve( | |
127 | new Promis e(function (resolve, reject) { | |
128 | client.g et(url, ar gs, functi on(respons eBody, res ponse) { | |
129 | resolv e({ respon seBody, re sponse }); | |
130 | }); | |
131 | }) | |
132 | ); | |
133 | }) | |
134 | .cat ch(error = > console. log('getRe source2 re st.js ', e rror)); | |
135 | }); | |
136 | }; |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.