simplify http handler call (#1233)
Some checks failed
build_downport / build_downport (push) Has been cancelled

* 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>
This commit is contained in:
oblomov 2024-06-27 01:24:45 +02:00 committed by GitHub
parent 43d9524e6a
commit aeaaa3406f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.