@@ -19,6 +19,7 @@ import { Subject } from "rxjs";
19
19
export class DateService {
20
20
private readonly http : HttpClient ;
21
21
private serviceUrlValue : string = "" ;
22
+ public httpOptions : { } = { } ;
22
23
23
24
public get serviceUrl ( ) : string {
24
25
return this . serviceUrlValue ;
@@ -34,6 +35,7 @@ export class DateService {
34
35
35
36
public get ( httpOptions ?: { } ) : Observable < Date > {
36
37
let subject = new Subject < Date > ( ) ;
38
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
37
39
let url : string = this . serviceUrl + "/api/date/get" ;
38
40
this . http . get < Date > ( url , httpOptions ) . subscribe ( ( result ) => {
39
41
subject . next ( this . fixUndefined ( this . convertToDate ( result ) ) ) ;
@@ -44,6 +46,7 @@ export class DateService {
44
46
45
47
public getArray ( httpOptions ?: { } ) : Observable < Date [ ] > {
46
48
let subject = new Subject < Date [ ] > ( ) ;
49
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
47
50
let url : string = this . serviceUrl + "/api/date/getarray" ;
48
51
this . http . get < Date [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
49
52
subject . next ( this . fixUndefined ( result . map ( ( entry ) => this . convertToDate ( entry ) ) ) ) ;
@@ -54,6 +57,7 @@ export class DateService {
54
57
55
58
public getList ( httpOptions ?: { } ) : Observable < Date [ ] > {
56
59
let subject = new Subject < Date [ ] > ( ) ;
60
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
57
61
let url : string = this . serviceUrl + "/api/date/getlist" ;
58
62
this . http . get < Date [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
59
63
subject . next ( this . fixUndefined ( result . map ( ( entry ) => this . convertToDate ( entry ) ) ) ) ;
@@ -64,6 +68,7 @@ export class DateService {
64
68
65
69
public getEnumerable ( httpOptions ?: { } ) : Observable < Date [ ] > {
66
70
let subject = new Subject < Date [ ] > ( ) ;
71
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
67
72
let url : string = this . serviceUrl + "/api/date/getenumerable" ;
68
73
this . http . get < Date [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
69
74
subject . next ( this . fixUndefined ( result . map ( ( entry ) => this . convertToDate ( entry ) ) ) ) ;
@@ -74,6 +79,7 @@ export class DateService {
74
79
75
80
public getComplex ( httpOptions ?: { } ) : Observable < DateModel > {
76
81
let subject = new Subject < DateModel > ( ) ;
82
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
77
83
let url : string = this . serviceUrl + "/api/date/getcomplex" ;
78
84
this . http . get < DateModel > ( url , httpOptions ) . subscribe ( ( result ) => {
79
85
if ( result ) {
@@ -87,6 +93,7 @@ export class DateService {
87
93
88
94
public getComplexArray ( httpOptions ?: { } ) : Observable < DateModel [ ] > {
89
95
let subject = new Subject < DateModel [ ] > ( ) ;
96
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
90
97
let url : string = this . serviceUrl + "/api/date/getcomplexarray" ;
91
98
this . http . get < DateModel [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
92
99
if ( result ) {
@@ -102,6 +109,7 @@ export class DateService {
102
109
103
110
public getComplexList ( httpOptions ?: { } ) : Observable < DateModel [ ] > {
104
111
let subject = new Subject < DateModel [ ] > ( ) ;
112
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
105
113
let url : string = this . serviceUrl + "/api/date/getcomplexlist" ;
106
114
this . http . get < DateModel [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
107
115
if ( result ) {
@@ -117,6 +125,7 @@ export class DateService {
117
125
118
126
public getComplexEnumerable ( httpOptions ?: { } ) : Observable < DateModel [ ] > {
119
127
let subject = new Subject < DateModel [ ] > ( ) ;
128
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
120
129
let url : string = this . serviceUrl + "/api/date/getcomplexenumerable" ;
121
130
this . http . get < DateModel [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
122
131
if ( result ) {
@@ -132,6 +141,7 @@ export class DateService {
132
141
133
142
public getWrappedArray ( httpOptions ?: { } ) : Observable < DateArrayWrapper > {
134
143
let subject = new Subject < DateArrayWrapper > ( ) ;
144
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
135
145
let url : string = this . serviceUrl + "/api/date/getwrappedarray" ;
136
146
this . http . get < DateArrayWrapper > ( url , httpOptions ) . subscribe ( ( result ) => {
137
147
subject . next ( this . fixUndefined ( result ) ) ;
@@ -142,6 +152,7 @@ export class DateService {
142
152
143
153
public getWrappedModel ( httpOptions ?: { } ) : Observable < DateModelWrapper > {
144
154
let subject = new Subject < DateModelWrapper > ( ) ;
155
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
145
156
let url : string = this . serviceUrl + "/api/date/getwrappedmodel" ;
146
157
this . http . get < DateModelWrapper > ( url , httpOptions ) . subscribe ( ( result ) => {
147
158
if ( result ) {
@@ -157,6 +168,7 @@ export class DateService {
157
168
158
169
public getWrappedModelList ( httpOptions ?: { } ) : Observable < DateModelWrapper [ ] > {
159
170
let subject = new Subject < DateModelWrapper [ ] > ( ) ;
171
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
160
172
let url : string = this . serviceUrl + "/api/date/getwrappedmodellist" ;
161
173
this . http . get < DateModelWrapper [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
162
174
if ( result ) {
@@ -174,6 +186,7 @@ export class DateService {
174
186
175
187
public getWrappedModelListWrapper ( httpOptions ?: { } ) : Observable < DateModelWrapperListWrapper > {
176
188
let subject = new Subject < DateModelWrapperListWrapper > ( ) ;
189
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
177
190
let url : string = this . serviceUrl + "/api/date/getwrappedmodellistwrapper" ;
178
191
this . http . get < DateModelWrapperListWrapper > ( url , httpOptions ) . subscribe ( ( result ) => {
179
192
if ( result ) {
@@ -193,6 +206,7 @@ export class DateService {
193
206
194
207
public getWrappedModelListWrapperList ( httpOptions ?: { } ) : Observable < DateModelWrapperListWrapper [ ] > {
195
208
let subject = new Subject < DateModelWrapperListWrapper [ ] > ( ) ;
209
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
196
210
let url : string = this . serviceUrl + "/api/date/getwrappedmodellistwrapperlist" ;
197
211
this . http . get < DateModelWrapperListWrapper [ ] > ( url , httpOptions ) . subscribe ( ( result ) => {
198
212
if ( result ) {
@@ -214,6 +228,7 @@ export class DateService {
214
228
215
229
public getWrappedModelWithDate ( httpOptions ?: { } ) : Observable < DateModelWrapperWithDate > {
216
230
let subject = new Subject < DateModelWrapperWithDate > ( ) ;
231
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
217
232
let url : string = this . serviceUrl + "/api/date/getwrappedmodelwithdate" ;
218
233
this . http . get < DateModelWrapperWithDate > ( url , httpOptions ) . subscribe ( ( result ) => {
219
234
if ( result ) {
@@ -230,6 +245,7 @@ export class DateService {
230
245
231
246
public getWrappedModelArray ( httpOptions ?: { } ) : Observable < DateModelArrayWrapper > {
232
247
let subject = new Subject < DateModelArrayWrapper > ( ) ;
248
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
233
249
let url : string = this . serviceUrl + "/api/date/getwrappedmodelarray" ;
234
250
this . http . get < DateModelArrayWrapper > ( url , httpOptions ) . subscribe ( ( result ) => {
235
251
if ( result ) {
@@ -247,6 +263,7 @@ export class DateService {
247
263
248
264
public getGenericWithModel ( httpOptions ?: { } ) : Observable < GenericResult < DateModel > > {
249
265
let subject = new Subject < GenericResult < DateModel > > ( ) ;
266
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
250
267
let url : string = this . serviceUrl + "/api/date/getgenericwithmodel" ;
251
268
this . http . get < GenericResult < DateModel > > ( url , httpOptions ) . subscribe ( ( result ) => {
252
269
if ( result ) {
@@ -264,6 +281,7 @@ export class DateService {
264
281
265
282
public post ( date : Date , httpOptions ?: { } ) : Observable < void > {
266
283
let subject = new Subject < void > ( ) ;
284
+ httpOptions = { ...this . httpOptions , ...httpOptions } ;
267
285
let url : string = this . serviceUrl + "/api/date/post" ;
268
286
url = this . appendDate ( url , date , "date" ) ;
269
287
this . http . post < void > ( url , undefined , httpOptions ) . subscribe ( ( ) => {
0 commit comments