@@ -181,21 +181,22 @@ export class HttpRestUtils {
181
181
}
182
182
183
183
private static getRequest ( callConfig : CallConfig ) {
184
+ const { body : any , ...params } = callConfig . params ;
184
185
switch ( callConfig . requestMethodName ) {
185
186
case RequestMethodParams . get :
186
187
return HttpRestUtils . http . get ( callConfig . url , callConfig . params ) ;
187
188
case RequestMethodParams . post :
188
- return HttpRestUtils . http . post ( callConfig . url , callConfig . params ) ;
189
+ return HttpRestUtils . http . post ( callConfig . url , body , params ) ;
189
190
case RequestMethodParams . put :
190
- return HttpRestUtils . http . put ( callConfig . url , callConfig . params ) ;
191
+ return HttpRestUtils . http . put ( callConfig . url , body , params ) ;
191
192
case RequestMethodParams . delete :
192
193
return HttpRestUtils . http . delete ( callConfig . url , callConfig . params ) ;
193
194
case RequestMethodParams . options :
194
195
return HttpRestUtils . http . options ( callConfig . url , callConfig . params ) ;
195
196
case RequestMethodParams . head :
196
197
return HttpRestUtils . http . head ( callConfig . url , callConfig . params ) ;
197
198
case RequestMethodParams . patch :
198
- return HttpRestUtils . http . patch ( callConfig . url , callConfig . params ) ;
199
+ return HttpRestUtils . http . patch ( callConfig . url , body , params ) ;
199
200
default :
200
201
return HttpRestUtils . http . request ( callConfig . requestMethodName , callConfig . url , callConfig . params ) ;
201
202
}
0 commit comments