From aeaaa3406f24e6adb85572b9d058164321db96d9 Mon Sep 17 00:00:00 2001 From: oblomov <102328295+oblomov-dev@users.noreply.github.com> Date: Thu, 27 Jun 2024 01:24:45 +0200 Subject: [PATCH] simplify http handler call (#1233) * simplify http handler call * Update src/02/z2ui5_cl_http_handler.clas.abap Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com> * Update src/02/z2ui5_cl_http_handler.clas.abap Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com> --------- Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com> --- src/02/z2ui5_cl_http_handler.clas.abap | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/02/z2ui5_cl_http_handler.clas.abap b/src/02/z2ui5_cl_http_handler.clas.abap index c05e723e..102a8af2 100644 --- a/src/02/z2ui5_cl_http_handler.clas.abap +++ b/src/02/z2ui5_cl_http_handler.clas.abap @@ -18,7 +18,8 @@ CLASS z2ui5_cl_http_handler DEFINITION CLASS-METHODS main IMPORTING - val TYPE string + body type string + config TYPE z2ui5_if_types=>ty_s_http_request_get OPTIONAL RETURNING VALUE(result) TYPE string. @@ -48,9 +49,9 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. METHOD main. - result = SWITCH #( val - WHEN `` THEN http_get( ) - ELSE http_post( val ) ). + result = SWITCH #( body + WHEN `` THEN http_get( config ) + ELSE http_post( body ) ). ENDMETHOD.