mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 02:58:20 +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
|
CLASS-METHODS main
|
||||||
IMPORTING
|
IMPORTING
|
||||||
val TYPE string
|
body type string
|
||||||
|
config TYPE z2ui5_if_types=>ty_s_http_request_get OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(result) TYPE string.
|
VALUE(result) TYPE string.
|
||||||
|
|
||||||
|
@ -48,9 +49,9 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD main.
|
METHOD main.
|
||||||
|
|
||||||
result = SWITCH #( val
|
result = SWITCH #( body
|
||||||
WHEN `` THEN http_get( )
|
WHEN `` THEN http_get( config )
|
||||||
ELSE http_post( val ) ).
|
ELSE http_post( body ) ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user