mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-28 18:26:18 +08:00
simplify http handler call (#1233)
Some checks failed
build_downport / build_downport (push) Has been cancelled
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:
parent
43d9524e6a
commit
aeaaa3406f
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user